hachikuji commented on code in PR #15092:
URL: https://github.com/apache/kafka/pull/15092#discussion_r1441070583
##########
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? Note that
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]