sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r1792446 - /sling/site/trunk/content/documentation/development/jsr-305.mdtext
Date Mon, 24 Apr 2017 09:58:52 GMT
Author: kwin
Date: Mon Apr 24 09:58:52 2017
New Revision: 1792446

URL: http://svn.apache.org/viewvc?rev=1792446&view=rev
Log:
mention runtime dependency towards package `javax.annotation`

Modified:
    sling/site/trunk/content/documentation/development/jsr-305.mdtext

Modified: sling/site/trunk/content/documentation/development/jsr-305.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development/jsr-305.mdtext?rev=1792446&r1=1792445&r2=1792446&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/development/jsr-305.mdtext (original)
+++ sling/site/trunk/content/documentation/development/jsr-305.mdtext Mon Apr 24 09:58:52
2017
@@ -15,6 +15,8 @@ Due to the fact that Eclipse and FindBug
 
 Annotations which support setting the default null semantics of return values and or parameters
on a package level cannot be leveraged for that reason.
 
+The annotations have a retention policy of "runtime", therefore bundles using these automatically
have a `Import-Package` header listing `javax.annotation`. That package is by default exported
by the system bundle (as this package is also part of the [JRE](https://docs.oracle.com/javase/7/docs/api/javax/annotation/package-summary.html)).
To be able to resolve the bundle through this exported package from the system bundle you
should use the `com.google.code.findbugs:jsr305` artifact in version 3.0.0 as that exports
the package `javax.annotation` in no specific version. Newer versions use version directives
which automatically restrict the version range for the generated `Import-Package` header to
`[3,4)` [which usually cannot be resolved at run time](https://github.com/amaembo/jsr-305/issues/31).
+
 # Use With Eclipse
 Eclipse since Juno supports [null analysis based on any annotations](http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fpreferences%2Fjava%2Fcompiler%2Fref-preferences-errors-warnings.htm&anchor=null_analysis).
Those need to be enabled in 
 *Preferences->Java->Compiler->Errors/Warnings* via **Enable annoation-based null
analysis**.



Mime
View raw message