rreddy-22 commented on code in PR #15150:
URL: https://github.com/apache/kafka/pull/15150#discussion_r1459585333


##########
clients/src/main/java/org/apache/kafka/clients/admin/ListConsumerGroupsOptions.java:
##########
@@ -34,13 +35,24 @@ public class ListConsumerGroupsOptions extends 
AbstractOptions<ListConsumerGroup
 
     private Set<ConsumerGroupState> states = Collections.emptySet();
 
+    private Set<GroupType> types = Collections.emptySet();
+
     /**
-     * If states is set, only groups in these states will be returned by 
listConsumerGroups()
+     * If states is set, only groups in these states will be returned by 
listConsumerGroups().
      * Otherwise, all groups are returned.
      * This operation is supported by brokers with version 2.6.0 or later.
      */
     public ListConsumerGroupsOptions inStates(Set<ConsumerGroupState> states) {
-        this.states = (states == null) ? Collections.emptySet() : new 
HashSet<>(states);
+        this.states = (states == null || states.isEmpty()) ? 
Collections.emptySet() : new HashSet<>(states);
+        return this;
+    }
+
+    /**
+     * If types is set, only groups of these types will be returned by 
listConsumerGroups().
+     * Otherwise, all groups are returned.

Review Comment:
   yes yes



-- 
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]

Reply via email to