jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Reschke (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-37) Use nullability annotation to enforce/document API contract
Date Wed, 09 May 2012 12:17:48 GMT

    [ https://issues.apache.org/jira/browse/OAK-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271355#comment-13271355

Julian Reschke commented on OAK-37:

I just checked with FindBugs 2.01, and annotating methods with @CheckForNull and @Nonnull
seemed to have the desired effect.

That being said, this appears to be a can of worms; JSR-305 is dormant; FindBugs supports
the annotation using it's own package + javax.annotation.

IntelliJ is said to support them in "all" packages, but I can't test that.

There's also a Eclipse JDT extension in the works which appears to be configurable with respect
to package names (http://wiki.eclipse.org/JDT_Core/Null_Analysis)

In the end we need something that has an acceptable license, and can be automatically checked;
FindBugs is probably a candidate for that.

> Use nullability annotation to enforce/document API contract
> -----------------------------------------------------------
>                 Key: OAK-37
>                 URL: https://issues.apache.org/jira/browse/OAK-37
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, jcr, mk
>            Reporter: Michael Dürig
> In a discussion about exception handling on the dev list [1] Julian brough up the idea
of using nullability annotations in APIs. I think we should decide on which one to use and
start using them whereever apropriate. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message