[COLLECTIONS-512] Revert javadoc comment in AbstractCollectionDecorator, method should not delegate, see COLLECTIONS-543.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1651099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9e64a3cb81
commit
6975b0567d
|
@ -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.
|
||||
|
|
|
@ -144,16 +144,6 @@ public abstract class AbstractCollectionDecorator<E>
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue