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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.1.0
    • 2.0.0
    • clients, tools
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: