Konrad Windszus created SLING-12733:
---------------------------------------

             Summary: ResourceMapper.getMapping(...) may return null
                 Key: SLING-12733
                 URL: https://issues.apache.org/jira/browse/SLING-12733
             Project: Sling
          Issue Type: Improvement
          Components: API
            Reporter: Konrad Windszus


Although all {{getMapping(...)}} methods in {{ResourceMapper}} have a 
{{@NotNull}} annotation on the return value 
(https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/resource/mapping/ResourceMapper.java).
 However the implementation may return null:

https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/c73f8b5912a0dceef12b255e568e046450dc67de/src/main/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImpl.java#L71

https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/c73f8b5912a0dceef12b255e568e046450dc67de/src/main/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImpl.java#L79

IMHO this is reasonable so I would just propose to update the null annotation 
here. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to