NullPointerException using Document#getList where the BSON array contains null elements

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.8.2
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • Minor Change
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Please add Null check while in the values while using constructValuesList method

      Caused by: java.lang.NullPointerException: null
          at org.bson.Document.constructValuesList(Document.java:381)
          at org.bson.Document.getList(Document.java:349)
       

      null check for item. PFA 

       

       

      Sample input which causes the exception  

        "skills" : [ 
              "SQL", 
              "null", 
              "null", 
              "null", 
              "null", 
              null, 
              null, 
              null, 
              null, 
              null
          ]
      
      

              Assignee:
              Jeffrey Yemin
              Reporter:
              Jaspal Jessy
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: