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

Investigate Coverity report of dereferencing a null return value in PojoBuilderHelper.​configureClassModelBuilder

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.0
    • Affects Version/s: None
    • Component/s: Internal
    • None

      The report is as follows:

      102383 Dereference null return value
      If the function actually returns a null value, a NullPointerException will be thrown.
      
      In org.​bson.​codecs.​pojo.​PojoBuilderHelper.​configureClassModelBuilder(org.​bson.​codecs.​pojo.​ClassModelBuilder, java.​lang.​Class): Return value of function which returns null is dereferenced without checking (CWE-476)
      

      It's not immediately obvious whether an NPE can happen in practice, but it should be investigated and the Coverity issue updated appropriately.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: