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

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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.7.0
    • None
    • Internal
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: