NPE in BasicDBObject.equals

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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; }

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            dustin norlander
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: