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

Remove checker qual and migrate to jetbrains annotations #390

Merged
merged 2 commits into from
Jun 4, 2021

Conversation

kezz
Copy link
Member

@kezz kezz commented May 29, 2021

Closes #386.

This also removes the compile only dependencies on checker qual, not sure if these should be left until a breaking release or not.

Some points of note:

  • Some @Nullable annotations were added where they were missing in equals overrides.
  • There is no replacement for @MonotonicNonNull or @PolyNull. Both have been replaced with @Nullable annotations with appropriate @Contract annotations for poly null methods.

@kashike
Copy link
Member

kashike commented May 29, 2021

org.jetbrains.annotations.UnknownNullability?

@kezz kezz force-pushed the remove-checker-qual branch from 54d6c60 to 5b9570c Compare May 29, 2021 14:28
@kezz
Copy link
Member Author

kezz commented May 29, 2021

org.jetbrains.annotations.UnknownNullability?

I pondered that but it's not really true, we do know the nullability but there's no way to accurately express it. That being said, it is definitely the case that @UnknownNullability will prevent IDE warnings (IDEA doesn't bothing nagging you) but at the cost of people potentially missing errors in their own code. I think it might make more sense to leave it @Nullable and let people ignore this warning if they know that the supplier never returns null.

@kashike
Copy link
Member

kashike commented May 29, 2021

I think it might make more sense to leave it @Nullable and let people ignore this warning if they know that the supplier never returns null.

I would rather we drop the annotation - I know that having this @Nullable would annoy people, myself included.

@kezz kezz force-pushed the remove-checker-qual branch from 5b9570c to c392b19 Compare May 29, 2021 14:47
@kezz
Copy link
Member Author

kezz commented May 29, 2021

I would rather we drop the annotation - I know that having this @Nullable would annoy people, myself included.

Okie dokie! I've moved it over to @UnknownNullability as that is the default for non-annotated types and the docs for that method state pretty much the exact reason we'd use it in these supplier cases.

@kashike
Copy link
Member

kashike commented May 31, 2021

Rebase required.

@kezz kezz force-pushed the remove-checker-qual branch from c392b19 to 5561c82 Compare June 4, 2021 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment