You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2016/03/17 14:35:33 UTC

[jira] [Commented] (SLING-5617) Add missing JSR305 annotations to ResourceProvider

    [ https://issues.apache.org/jira/browse/SLING-5617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15199526#comment-15199526 ] 

Carsten Ziegeler commented on SLING-5617:
-----------------------------------------

For authenticate: this should return an object *if* the provider supports authentication, if the provider does not support authentication, null is valid. The javadoc also states "A valid implementation might return {@code null} as the context information." Therefore the annotation needs to be fixed.
copy/move: both parameters are required

> Add missing JSR305 annotations to ResourceProvider
> --------------------------------------------------
>
>                 Key: SLING-5617
>                 URL: https://issues.apache.org/jira/browse/SLING-5617
>             Project: Sling
>          Issue Type: Improvement
>    Affects Versions: API 2.11.0
>            Reporter: Konrad Windszus
>
> Currently the {{o.a.s.spi.resource.provider.ResourceProvider}} is lacking some JSR305 annotations regarding their return values or parameters. Those are the methods
> # getAttributeNames (should never return null)
> # authenticate is supposed to never return null, but does so in the abstract class, either the implementation or the annotation must be fixed
> # getProviderContext (may return null)
> # getAttribute (may return null)
> # create (must not return null)
> # copy and move (srcAbsPath and destAbsPath are not annotated)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)