vertx-kafka-client icon indicating copy to clipboard operation
vertx-kafka-client copied to clipboard

io.vertx.kafka.client.consumer.OffsetAndMetadata equals and hashcode contract

Open arkadiuszpalka opened this issue 6 months ago • 0 comments

Version

4.5.9

Context

The io.vertx.kafka.client.consumer.OffsetAndMetadata doesn't respect the equals and hashcode contract. I encountered it while I was writing unit tests and IMO it looks like a bug because io.vertx.kafka.client.common.TopicPartition respects that contract.

Do you have a reproducer?

No, please evaluate these expressions:

// Kotlin
OffsetAndMetadata(1, null) == OffsetAndMetadata(1, null) // false
TopicPartition("MOCK_TOPIC", 1) == TopicPartition("MOCK_TOPIC", 1) // true

Steps to reproduce

Not needed

Extra

java -version

openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment Homebrew (build 17.0.10+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.10+0, mixed mode, sharing)

arkadiuszpalka avatar Aug 06 '24 10:08 arkadiuszpalka