Hi,
according to 
https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/spi/resource/provider/ResolveContext.java
 all getter methods except for getResourceResolver() may return null.
Still e.g. in 
https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/89bc0bb344d6c7f109f6e43ef5e87bda7c04d286/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java#L320
 their return values are very often dereferenced unconditionally.

Are the null annotation values/javadoc incorrect here or are there just null 
checks missing in JcrResourceProvider?

This came up in the context of https://issues.apache.org/jira/browse/SLING-10918

Thanks in advance for your input,
Konrad

Reply via email to