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

NPE in BasicDBObject.equals

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.3
    • None
    • None
    • None

    Description

      line 227 results in NPE if the other object does not contain the specified key.

      Object a = get( key );
      Object b = other.get( key );

      if ( a instanceof Number && b instanceof Number )

      { if ( ((Number)a).doubleValue() != ((Number)b).doubleValue() ) return false; }

      else

      { HERE (b=null) ----> if ( ! a.equals( b ) ) return false; }

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            dustinn dustin norlander
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: