[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: |
|
||||||||||||||||
| 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. |