[JAVA-80] NPE in BasicDBObject.equals Created: 25/Jan/10  Updated: 01/Mar/10  Resolved: 25/Jan/10

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3

Type: Bug Priority: Major - P3
Reporter: dustin norlander Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


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

 Comments   
Comment by auto [ 25/Jan/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: fix npe in BasicDBObject.equals JAVA-80
http://github.com/mongodb/mongo-java-driver/commit/149c190a58a5f492fbaf72592c059c0e45d9a1c0

Generated at Thu Feb 08 08:51:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.