sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
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

mention runtime dependency towards package `javax.annotation`


Modified: sling/site/trunk/content/documentation/development/jsr-305.mdtext
--- 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
@@ -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](
To be able to resolve the bundle through this exported package from the system bundle you
should use the `` 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](
 # Use With Eclipse
 Eclipse since Juno supports [null analysis based on any annotations](
Those need to be enabled in 
 *Preferences->Java->Compiler->Errors/Warnings* via **Enable annoation-based null

View raw message