Including nullness annotations in the 3.7.x series driver was a welcome addition. Thanks for adding this very useful metadata.
There are a few places in the API where methods and parameters are (meta-)labeled with the wrong nullness annotation.
Some examples, but far from exhaustive:
- com.mongodb.client.MongoCollection: The package has the NonNullApi meta-annotation. Methods in the findOneAnd$OP class can all return null, but are not annotated with @CheckForNull or @Nullable
- com.mongodb.client.model.Aggregates#group: The package has NonNullApi, but `null` has been an accepted parameter for TExpression id
- com.mongodb.client.model.Filters#eq: The package has NonNullApi, but `null` has been an accepted parameter for TItem value