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

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

    XMLWordPrintable

    Details

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

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

              Dates

              Created:
              Updated:
              Resolved: