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

Not working - What libraries to add for Java-11 based application #22

Open
venkateshamurthy opened this issue Aug 20, 2021 · 1 comment

Comments

@venkateshamurthy
Copy link

I did try putting the @NonNullPacakge and was hoping it would @nonnull kind of condition for all method parameters (including for static methods)....but it didmt.

By theway where are the annotation processor code...please indicate that

@venkateshamurthy venkateshamurthy changed the title Not working - What libraries to add or Java-11 based application Not working - What libraries to add for Java-11 based application Aug 20, 2021
@tlinkowski
Copy link
Owner

tlinkowski commented Aug 22, 2021

was hoping it would @nonnull kind of condition for all method parameters (including for static methods)....but it didmt.

Hi, where/how did you expect this non-nullity to manifest?

This is how it works:

  • there's no dedicated annotation processor for @NonNullPackage
  • instead, @NonNullPackage annotation is based on JSR-305's @TypeQualierDefault annotation (which is a JSR-305 annotation designed specifically for creating custom nullability annotations)
  • as a result, @NonNullPackage should be recognized by all processors that already handle JSR-305 (e.g. IntelliJ IDE, Kotlin compiler)

As to libraries which can handle JSR-305, I'd check SpotBugs (but I haven't checked it myself - to me, just IntelliJ & Kotlin support was enough).

PS. Actually, there already was a question similar to yours 2 years ago - please see my answer to this question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants