You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2019/04/19 10:14:00 UTC

[jira] [Assigned] (SLING-7723) XSS API is using other JSR-305 annotations than the rest of Sling

     [ https://issues.apache.org/jira/browse/SLING-7723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Cotescu reassigned SLING-7723:
-----------------------------------

    Assignee: Stefan Seifert  (was: Radu Cotescu)

> XSS API is using other JSR-305 annotations than the rest of Sling
> -----------------------------------------------------------------
>
>                 Key: SLING-7723
>                 URL: https://issues.apache.org/jira/browse/SLING-7723
>             Project: Sling
>          Issue Type: Improvement
>          Components: XSS Protection API
>    Affects Versions: XSS Protection API 2.0.6
>            Reporter: Konrad Windszus
>            Assignee: Stefan Seifert
>            Priority: Major
>             Fix For: XSS Protection API 2.0.14
>
>
> According to https://sling.apache.org/documentation/development/jsr-305.html only two different annotations are supposed to be used:
> {code}
> javax.annotation.CheckForNull
> javax.annotation.Nonnull
> {code}
> The {{XSSAPI}} uses though 
> {code}
> javax.annotation.Nullable
> javax.annotation.Nonnull
> {code}
> Since it is trickier to setup the IDE to support both {{Nullable}} and {{CheckForNull}} and also FindBugs is only supporting the latter, I would recommend to switch to {{CheckForNull}} for return values which might be {{null}}. Every method argument which is not explicitly marked as {{Nonnull}} is always considered {{Nullable}} by every tool! 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)