kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Coates (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-6727) org.apache.kafka.clients.admin.Config has broken equals and hashCode method.
Date Thu, 29 Mar 2018 12:53:00 GMT
Andy Coates created KAFKA-6727:
----------------------------------

             Summary: org.apache.kafka.clients.admin.Config has broken equals and hashCode
method.
                 Key: KAFKA-6727
                 URL: https://issues.apache.org/jira/browse/KAFKA-6727
             Project: Kafka
          Issue Type: Improvement
          Components: clients, tools
    Affects Versions: 1.1.0
            Reporter: Andy Coates
            Assignee: Andy Coates


`Config` makes use of `Collections.unmodifiableCollection` to wrap the supplied entries to
make it immutable. Unfortunately, this breaks `hashCode` and `equals`.

>From Java docs:

> The returned collection does _not_ pass the hashCode and equals operations through
to the backing collection, but relies on {{Object}}'s {{equals}} and {{hashCode}} methods.

See: https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#unmodifiableCollection(java.util.Collection)

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message