OldTruckDriver opened a new pull request, #687:
URL: https://github.com/apache/commons-collections/pull/687

   [COLLECTIONS-891] Fix IndexedCollection contains equality
   
   IndexedCollection#contains(Object) used the transformed key only, so it 
could return true for an object that was never added when another object mapped 
to the same key.
   
   This change keeps the indexed lookup as a fast candidate filter, then checks 
object equality within the indexed values before returning true.
   
   Tests cover both unique and non-unique indexed collections where "01" and 
"1" map to the same key but are not equal objects.
   
   Tests run:
   - mvn -q 
-Dtest=org.apache.commons.collections4.collection.IndexedCollectionTest#testContainsUsesObjectEqualityNotOnlyTransformedKey
 test
   - mvn -q 
-Dtest=org.apache.commons.collections4.collection.IndexedCollectionTest#testContainsUsesObjectEqualityWithNonUniqueIndex
 test
   - mvn -q 
-Dtest=org.apache.commons.collections4.collection.IndexedCollectionTest test
   - mvn -q


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to