Details
-
Improvement
-
Resolution: Unresolved
-
Unknown
-
None
-
None
-
None
-
(copied to CRM)
Description
At present equals() is inherited from Object, thus comparing two CreateIndexOptions is not straightforward as the inherited method does not actually compare the content of the objects:
CreateIndexOptions io = new CreateIndexOptions(); |
CreateIndexOptions io2 = new CreateIndexOptions(); |
boolean result = io.equals(io2); |
boolean result2 = io.equals(io); |
System.out.println(result);
|
System.out.println(result2);
|
System.out.println(io.toString());
|
System.out.println(io2.toString());
|
The above yields:
false
|
true
|
CreateIndexOptions{maxTimeMS=0, commitQuorum=null}
|
CreateIndexOptions{maxTimeMS=0, commitQuorum=null}
|
The same goes for nearly every model class in the driver.