[JAVA-482] (DB/BSON)Object "equals" method is broken Created: 05/Dec/11  Updated: 21/Jan/14  Resolved: 21/Jan/14

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

Type: Bug Priority: Major - P3
Reporter: Alexander Azarov Assignee: Jeffrey Yemin
Resolution: Duplicate Votes: 1
Labels: bson
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates JAVA-416 Using an Array to create a DBObject b... Closed
Related
related to JAVA-416 Using an Array to create a DBObject b... Closed

 Description   

`equals` on DBObjects compares arrays using arr.equals(other), but this Java method returns "false" always. Arrays.equals should be used: http://docs.oracle.com/javase/6/docs/api/java/util/Arrays.html#equals%28java.lang.Object[],%20java.lang.Object[]%29

This means, there is no way to compare two DBObjects when they contain arrays.


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