Incorrect JSR-305 nullability annotations

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 3.8.0
    • Affects Version/s: 3.7.0
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:

      1. 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
      2. com.mongodb.client.model.Aggregates#group: The package has NonNullApi, but `null` has been an accepted parameter for TExpression id
      3. com.mongodb.client.model.Filters#eq: The package has NonNullApi, but `null` has been an accepted parameter for TItem value

            Assignee:
            Unassigned
            Reporter:
            Elan Kugelmass
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: