You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2016/03/15 16:05:33 UTC
[jira] [Resolved] (SLING-5610) ResourceUtil.getValueMap() contains
a wrong @Nonnull annotation
[ https://issues.apache.org/jira/browse/SLING-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konrad Windszus resolved SLING-5610.
------------------------------------
Resolution: Fixed
Fix Version/s: API 2.12.0
Fixed with [r1735095|https://svn.apache.org/r1735095].
> ResourceUtil.getValueMap() contains a wrong @Nonnull annotation
> ----------------------------------------------------------------
>
> Key: SLING-5610
> URL: https://issues.apache.org/jira/browse/SLING-5610
> Project: Sling
> Issue Type: Bug
> Components: API
> Affects Versions: API 2.9.0
> Reporter: Dominik Lienemann
> Assignee: Konrad Windszus
> Fix For: API 2.12.0
>
>
> *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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)