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

Forbid any usage of javax.annotation.Nonnull #161

Open
kokosing opened this issue Oct 29, 2018 · 4 comments
Open

Forbid any usage of javax.annotation.Nonnull #161

kokosing opened this issue Oct 29, 2018 · 4 comments

Comments

@kokosing
Copy link
Contributor

No description provided.

kokosing referenced this issue in prestodb/presto Oct 29, 2018
By default fields and parameters are by default non nullable.
There is no need to annotate that.
@dain
Copy link
Member

dain commented Oct 29, 2018

@kokosing the @Nonnull annotation is part of the Java Bean Validation Framework we use for Airlift configuration objects, so I don't think we can forbid it.

@findepi
Copy link
Contributor

findepi commented Oct 29, 2018

validation -- javax.validation.constraints.NotNull
this is about -- javax.annotation.Nonnull (not used for validation, am i right?)

@dain
Copy link
Member

dain commented Oct 29, 2018

Oh interesting. I looked at the code for javax.annotation.Nonnull and saw the forConstantValue method and thought that was the bean validation version.

@findepi
Copy link
Contributor

findepi commented Oct 29, 2018

Looks like this is for checkers framework (static code analysis).

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

3 participants