Author: tn
Date: Mon Jan 12 14:08:25 2015
New Revision: 1651099
URL: http://svn.apache.org/r1651099
Log:
[COLLECTIONS-512] Revert javadoc comment in AbstractCollectionDecorator, method
should not delegate, see COLLECTIONS-543.
Modified:
commons/proper/collections/trunk/src/changes/changes.xml
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
Modified: commons/proper/collections/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/changes/changes.xml?rev=1651099&r1=1651098&r2=1651099&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/changes/changes.xml (original)
+++ commons/proper/collections/trunk/src/changes/changes.xml Mon Jan 12
14:08:25 2015
@@ -87,9 +87,7 @@
</action>
<action issue="COLLECTIONS-512" dev="tn" type="fix" due-to="Cyrille Artho">
"TransformingComparator" and "FixedOrderComparator" did not comply with
- the contract of "Object#equals". Added note to javadoc of
- "AbstractCollectionDecorator#equals(Object)" that the implementation
might
- break symmetry requirement of the "Collection#equals" contract.
+ the contract of "Object#equals".
</action>
<action issue="COLLECTIONS-510" dev="tn" type="fix" due-to="Hollis Waite">
Fix compilation errors when using source level 1.8 and a recent java 8
compiler.
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
URL:
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java?rev=1651099&r1=1651098&r2=1651099&view=diff
==============================================================================
---
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
(original)
+++
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/collection/AbstractCollectionDecorator.java
Mon Jan 12 14:08:25 2015
@@ -144,16 +144,6 @@ public abstract class AbstractCollection
return decorated().retainAll(coll);
}
- /**
- * <b>Note</b>: depending on the decorated collection, this implementation
- * might break the general contract of {@link Collection#equals(Object)} as
- * symmetry, i.e. {@code a.equals(b) == b.equals(a)}, can not be
guaranteed.
- * As a consequence, <b>do not use</b> this method for value comparisons of
- * arbitrary collections or decorators, use
- * {@link CollectionUtils#isEqualCollection(Collection, Collection)}
instead.
- * <p>
- * {@inheritDoc}
- */
@Override
public boolean equals(final Object object) {
return object == this || decorated().equals(object);