commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COLLECTIONS-543) AbstractCollectionDecorator should not delegate equals and hashcode
Date Wed, 07 Jan 2015 22:06:34 GMT
Thomas Neidhart created COLLECTIONS-543:
-------------------------------------------

             Summary: AbstractCollectionDecorator should not delegate equals and hashcode
                 Key: COLLECTIONS-543
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-543
             Project: Commons Collections
          Issue Type: Bug
    Affects Versions: 4.0
            Reporter: Thomas Neidhart
             Fix For: 4.1


In order to preserve the symmetry of equals the AbstractCollectionDecorator shall not forward
calls to equals and hashcode to the decorated collection.

The test for equality usually also includes a test for the specific interface, e.g. List,
which the collection decorator does not implement.

The relevant sub-classes like AbstractListDecorator can delegate the calls to safely fulfill
the Collections contract.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message