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

MongoBulkWriteException.getWriteConcernError() is missing a @Nullable annotation

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.0
    • None
    • API
    • None

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: