We already had a lengthy discussion about adaptTo() in
http://apache-sling.73963.n3.nabble.com/adaptTo-and-results-tt4035466.html.
In case there is ever a refactoring on the adaptTo method the exception
handling must for sure be clarified.
Konrad
> On 8 Dec 2016, at 17:03, Shurmer, Jordan <[email protected]> wrote:
>
> Hello Sling Devs,
>
> Currently the SlingAdaptable api specifies that null will be returned if the
> resource cannot be adapted. What are everyone's thoughts some future version
> of the API returning an Optional<AdapterType> instead?
> For reference:
> http://www.oracle.com/technetwork/articles/java/java8-optional-2175753.html
>
> Thanks,
> Jordan Shurmer
>