Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

16
  • 15
    The downside of javax.annotation is that it's a) based on a dead JSR, b) hard to find an artifact that just provides the annotations and is maintained. The one from findbugs is not: search.maven.org/… Commented Mar 9, 2017 at 23:51
  • 35
    Another point against javax.annotation is that it causes problems with Java 9 because other modules also provide classes in that package (jax-ws). Commented Sep 28, 2017 at 5:52
  • 14
    @kevinarpe: The Findbugs project is dead, and the successor project Spotbugs is removing those annotations: github.com/spotbugs/spotbugs/pull/180 Commented Nov 27, 2017 at 2:35
  • 19
    JSR 305, which would’ve standardized javax.annotation.NonNull, never completed because its spec lead went AWOL. It had nothing to do with any decision by Oracle. Commented Jul 25, 2018 at 20:55
  • 15
    Another reason not to use jsr305.jar is that it apparently violates the Oracle Java binary license: github.com/google/guava/issues/2960 Commented Apr 8, 2019 at 10:37