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*

3
  • The answer does not need the ugly import of spring-core any more. Commented Nov 25, 2022 at 10:38
  • According to your screenshot you configured the wrong annotation: first has to be javax.annotation.Nullable. Please note, as far as I known, only the org.eclipse.jdt null annotations do not pollute the bytecode. Commented Nov 25, 2022 at 12:59
  • This is what I meant with "If javax.annotation.CheckForNull or javax.annotation.Nullable should be used is probably debatable." I think that javax.annotation.CheckForNull equals org.eclipse.jdt.annotation.Nullable according to their respective Javadoc. javax.annotation.Nullable is (according to it's Javadoc) only a hint for the developer. Till now I have not yet considered comparing the bytecode, as I added the annotations only in the compile-scope. But it is an interesting point. Commented Nov 25, 2022 at 13:34