Justin Edelson created SLING-3714:
-------------------------------------

             Summary: 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


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
(v6.2#6252)

Reply via email to