[
https://issues.apache.org/jira/browse/SLING-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14322872#comment-14322872
]
ASF GitHub Bot commented on SLING-4377:
---------------------------------------
GitHub user kwin opened a pull request:
https://github.com/apache/sling/pull/63
SLING-4377, add JSR 305 annotations to Sling API
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kwin/sling SLING-4377-jsr305
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/63.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #63
----
commit c2a34c7ee8930af7bba9d9dd871f60d1c9045928
Author: Konrad Windszus <[email protected]>
Date: 2015-02-02T09:47:56Z
SLING-4377, initial version of JSR 305 annotations
commit d77d9b01b53df5d498b659bb55e34b26ff11b41b
Author: Konrad Windszus <[email protected]>
Date: 2015-02-02T09:55:46Z
SLING-4377, upgrade to Java 6
commit c7a24338591bf00ab2c9d6543d11c2c219592966
Author: Konrad Windszus <[email protected]>
Date: 2015-02-02T09:56:07Z
SLING-4377, revert excessive version increase
commit 44f3a2e28aa3fe48ce075212e8cc958613bf1e2f
Author: Konrad Windszus <[email protected]>
Date: 2015-02-04T09:22:18Z
SLING-4377 use @CheckForNull instead of @Nullable as this is also
understood by Findbugs
commit ab0e6fb1a9e1fa9fc83dba2c639766f23ff406b9
Author: Konrad Windszus <[email protected]>
Date: 2015-02-16T11:15:00Z
Merge branch 'trunk' into SLING-4377-jsr305
Conflicts:
bundles/api/src/main/java/org/apache/sling/api/resource/package-info.java
commit fad1934e33ee896de5f8b2d42e16dd9b06e64de0
Author: Konrad Windszus <[email protected]>
Date: 2015-02-16T13:19:13Z
restrict JSR 305 annotations to @CheckForNull and @Nonnull
commit e2111ad76cd5cd1c21e8d15bfdc5e727e04af980
Author: Konrad Windszus <[email protected]>
Date: 2015-02-16T13:37:23Z
bugfixing
commit f13596462a680cd7f642161ddcc14a8350b096bf
Author: Konrad Windszus <[email protected]>
Date: 2015-02-16T14:23:41Z
fix version, cannot determine null semantics for ValueMap.get with a
default value
commit 86dfebe65805eb9478335f50217b6d84b0996a56
Author: Konrad Windszus <[email protected]>
Date: 2015-02-16T15:26:23Z
revert to 2.8.0
----
> Add JSR305 annotations to Sling API
> -----------------------------------
>
> Key: SLING-4377
> URL: https://issues.apache.org/jira/browse/SLING-4377
> Project: Sling
> Issue Type: Improvement
> Components: API
> Reporter: Konrad Windszus
> Assignee: Konrad Windszus
>
> Since consumers of the Sling API always have to keep in mind whether a
> null-check is necessary it would be good to add JSR 305 annotations to the
> API.
> See also http://www.mail-archive.com/[email protected]/msg42199.html.
> At least Eclipse as well as Findbugs are supporting those and Oak Solr is
> using those already (https://issues.apache.org/jira/browse/OAK-2303).
> Only the following 2 annotations should be used:
> # {{@Nonnull}}, for return values which are not supposed to be {{null}} or
> parameters which must not be {{null}}.
> # {{@CheckForNull}}, for return values wich may be null {{null}}.
> Those are the only ones being supported by both Eclipse and Findbugs (compare
> with http://sourceforge.net/p/findbugs/bugs/1355/)
> {{@Nullable}} is basically ignored by Findbugs
> (http://findbugs.sourceforge.net/manual/annotations.html) and should
> therefore not be used. The package annotation for the default handling should
> also not be used (because either {{@Nullable}} or {{@CheckForNull}} is
> ignored by Eclipse then.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)