Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
API 2.9.0
-
None
Description
org.apache.sling.api.resource.ResourceUtil.getValueMap(res) performs a null check as first action (if ( res == null ) {). Also, the javadoc states that this method is null safe.
But the method contains a @Nonnull annotation for the res parameter (@Nonnull final Resource res) which forces the calling methods to do an additional null check, even if the method handles it internally.
I suggest to remove the annotation for the parameter.