[
https://issues.apache.org/jira/browse/SLING-3714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler resolved SLING-3714.
-------------------------------------
Resolution: Won't Fix
> Allow for a caller to request a non-null response from adaptTo()
> ----------------------------------------------------------------
>
> Key: SLING-3714
> URL: https://issues.apache.org/jira/browse/SLING-3714
> Project: Sling
> Issue Type: Improvement
> Reporter: Justin Edelson
> Priority: Major
>
> See SLING-3709 for a Sling Models-specific request. As I commented there, I
> think this makes more sense as a core change to the Adaptable interface.
> One option:
> resource.adaptTo(Result<Node>.class)
> Which returns a Result object, which has an API like:
> interface Result<T> {
> boolean isSuccess();
> T getObject();
> List<Error> getErrors();
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)