Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6727

org.apache.kafka.clients.admin.Config has broken equals and hashCode method.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 2.0.0
    • Component/s: clients, tools
    • Labels:
      None

      Description

      `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)

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                BigAndy Andy Coates
                Reporter:
                BigAndy Andy Coates
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: