mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-17 23:44:48 +00:00
[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>
|
||||||
<action issue="COLLECTIONS-512" dev="tn" type="fix" due-to="Cyrille Artho">
|
<action issue="COLLECTIONS-512" dev="tn" type="fix" due-to="Cyrille Artho">
|
||||||
"TransformingComparator" and "FixedOrderComparator" did not comply with
|
"TransformingComparator" and "FixedOrderComparator" did not comply with
|
||||||
the contract of "Object#equals". Added note to javadoc of
|
the contract of "Object#equals".
|
||||||
"AbstractCollectionDecorator#equals(Object)" that the implementation might
|
|
||||||
break symmetry requirement of the "Collection#equals" contract.
|
|
||||||
</action>
|
</action>
|
||||||
<action issue="COLLECTIONS-510" dev="tn" type="fix" due-to="Hollis Waite">
|
<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.
|
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);
|
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
|
@Override
|
||||||
public boolean equals(final Object object) {
|
public boolean equals(final Object object) {
|
||||||
return object == this || decorated().equals(object);
|
return object == this || decorated().equals(object);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user