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

NonNullApi, NonNullFields and inverse #907

Closed
xenoterracide opened this issue Feb 13, 2024 · 2 comments
Closed

NonNullApi, NonNullFields and inverse #907

xenoterracide opened this issue Feb 13, 2024 · 2 comments

Comments

@xenoterracide
Copy link

So after reading https://github.com/uber/NullAway/wiki/Supported-Annotations I'm assuming that the @NonNullApi and NonNullFields aren't in any way supported (they're spring)? https://www.baeldung.com/spring-null-safety-annotations if they aren't could they be?

I'd also love to support a mythical NullableApi and NullableFields obviously saying the inverse is the default... I say mythical, but making my own annotations, but they're really only good if something supports them.

Maybe to add on to this, a setting(? or additional ep rule) that requires you to have one or the other defined.

@msridhar
Copy link
Collaborator

Hi @xenoterracide NullAway already assumes everything is @NonNull by default, so I'm not sure what would be required to additionally support these annotations. Do you have an example you're thinking of?

@xenoterracide
Copy link
Author

To be honest I'm not sure how well they're supported outside of spring, and with all the talk around jspecify, that I only found out about 4 days ago, probably shortly after creating this. Probably not worth the conversation. Really it's all around the problem of "all tools aren't making the same assumptions as to what the defaults are, and so we still have to set both annotations on everything"

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