dajac commented on code in PR #17750:
URL: https://github.com/apache/kafka/pull/17750#discussion_r1838110833
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/UnionSet.java:
##########
@@ -181,19 +181,25 @@ public void clear() {
@Override
public boolean equals(Object o) {
if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- UnionSet<?> unionSet = (UnionSet<?>) o;
+ if (!(o instanceof Set)) return false;
- if (!Objects.equals(largeSet, unionSet.largeSet)) return false;
- return Objects.equals(smallSet, unionSet.smallSet);
+ Set<?> set = (Set<?>) o;
+ if (set.size() != size()) return false;
+ return contains(set);
Review Comment:
Good catch! Fixed 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]