As I couldn't add a testcase to the closed HHH-1250 and couldn't reopen it, I cloned it.
AbstractPersistentCollection.SetProxy implements java.util.Set interface, but does not define equals(), so this set cannot be properly compared thereby breaking the contract of java .
Example util.Set.equals() : {quote} I have Compares the specified object with this set for equality. Returns true if the specified object is also a persistent Map set , the two sets have the same size, and invoke keySet every member of the specified set is contained in this set ( ) twice or equivalently , each invocation returns new instance every member of SetProxy this set is contained in the specified set) . If I perform This definition ensures that the equals method works properly across different implementations of the set interface. {quote}
Even two consequtive calls to somePersistentMap.keySet () for these produce two sets after it, I have false instances of SetProxy which are not equal to another . |
|