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

Missing @Nullable on the value in Filters.eq #2201

Closed
zenbones opened this issue Jan 10, 2023 · 2 comments
Closed

Missing @Nullable on the value in Filters.eq #2201

zenbones opened this issue Jan 10, 2023 · 2 comments
Labels
Milestone

Comments

@zenbones
Copy link

Minor, but Jetbrains Idea reports Filters.eq("anAttribute", null) as annotated @NotNull. It's actually annotated with com.mongodb.lang.Nullable, so I suspect something is wrong with that annotation, which is probably not your problem, but it seems like just switching to the standard javax.annotation.Nullable would solve the issue.

@zenbones zenbones added the bug label Jan 10, 2023
@evanchooly evanchooly added this to the 2.3.1 milestone Jan 12, 2023
@evanchooly
Copy link
Member

It's actually missing an annotation on that field altogether. By default, all parameters and return values are non-nullable unless otherwise annotated. Since this parameter is missing that annotation, it gets the default from package-info.java.

@evanchooly evanchooly changed the title Minor, but Jetbrains Idea reports Filters.eq("anAttribute", null) as annotated @NotNull Missing @Nullable on the value in Filters.eq Jan 12, 2023
@evanchooly evanchooly changed the title Missing @Nullable on the value in Filters.eq Missing @Nullable on the value in Filters.eq Jan 12, 2023
@zenbones
Copy link
Author

Thanks.

evanchooly added a commit that referenced this issue Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants