Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add annotations for null/non-null and checking return value #48

Open
sharwell opened this issue Mar 16, 2017 · 0 comments
Open

Add annotations for null/non-null and checking return value #48

sharwell opened this issue Mar 16, 2017 · 0 comments

Comments

@sharwell
Copy link
Member

sharwell commented Mar 16, 2017

Usability in modern Java IDEs would be improved if the code were annotated with the following or equivalent:

  • @Nonnull
  • @Nullable
  • @CheckReturnValue (especially helpful for transformation methods on immutable collections)

Given that @CheckReturnValue is not present in org.jetbrains:annotations, which alternative is the least likely to cause problems for consumers of the library? Would com.google.code.findbugs:jsr305 be appropriate for most (or all) users?

💡 Currently this library has no runtime dependencies aside from the JRE itself.

Here are some use cases of interest:

  1. Ability to use the library from an Eclipse plug-in (OSGi)
  2. Ability to use the library from a non-OSGi plug-in
  3. Ability of modern IDEs to automatically recognize the annotations and report problems when client code fails to follow a declared restriction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant