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
  • 276
    apache should invent a "common" annotation and a tool that can convert it to any other annotation. the solution to the problem of too many standards is to invent a new standard. Commented Feb 11, 2011 at 0:15
  • 11
    @irreputable if apache invents a new "common", there would be 56 versions of it, overlapping with other projects. And, it wouldn't be standard anyway (standard != widespread). Better use anything really standard, javax?.* . BTW, there aren't "too many standards" in those examples, I just see 1 or 2. Commented Oct 27, 2012 at 8:15
  • 9
    javax.annotation.Nonnull does work with findbugs (just tested it), which is a compelling reason for me to use it. Commented Jul 18, 2013 at 8:33
  • 27
    If I simply write @NotNull, it refers to com.sun.istack.internal.NotNull. OMG... Commented Mar 6, 2015 at 7:34
  • 14
    A better link now for that effort is jspecify.org. We set out to create nullness annotations with precisely specified semantics, by consensus of major tool owners, which no one had tried before. It has turned out to be Hard, but we've made a lot of progress. Commented Nov 12, 2022 at 21:35