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

MongoBulkWriteException.getWriteConcernError() is missing a @Nullable annotation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0
    • Component/s: API
    • Labels:
      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

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

              Dates

              Created:
              Updated:
              Resolved: