hachikuji commented on code in PR #15092:
URL: https://github.com/apache/kafka/pull/15092#discussion_r1441070183
##########
clients/src/main/java/org/apache/kafka/clients/admin/ConsumerGroupListingTest.java:
##########
@@ -0,0 +1,27 @@
+package org.apache.kafka.clients.admin;
Review Comment:
We are missing the license. Also, we need to move this into
`clients/src/test/java`.
##########
clients/src/main/java/org/apache/kafka/clients/admin/ConsumerGroupListing.java:
##########
@@ -104,8 +104,8 @@ public boolean equals(Object obj) {
return false;
if (isSimpleConsumerGroup != other.isSimpleConsumerGroup)
return false;
- if (state == null) {
- if (other.state != null)
+ if (!state.isPresent()) {
Review Comment:
I think the expectation in the previous code was that `Optional.equals`
would handle this case. So can we just get rid of the null check? This depends
on the `requireNonNull` in the constructor. Perhaps we should have a unit test
to protect it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]