Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3719

MongoBulkWriteException.getWriteConcernError() is missing a @Nullable annotation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.0
    • Affects Version/s: None
    • Component/s: API
    • Labels:
      None

      I try to do a null check on the writeConcernError field in kotlin  as such:  
      if (mongoBulkWriteException.writeConcernError !== null) throw ex My IDE (intellij) complains that this condition will always evaluate to true. The docs are clear that the field is nullable so my IDE is clearly wrong. I suspect adding the @Nullable annotation to the getter will help guide my IDE to stop misinforming me

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            jbotuck@gmail.com Jacob Botuck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: