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


##########
clients/src/main/java/org/apache/kafka/clients/admin/ListConsumerGroupsOptions.java:
##########
@@ -34,13 +34,25 @@ public class ListConsumerGroupsOptions extends 
AbstractOptions<ListConsumerGroup
 
     private Set<ConsumerGroupState> states = Collections.emptySet();
 
+    private Set<ConsumerGroupType> groupTypes = 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() : states;
+        return this;
+    }
+
+    /**
+     * If groupTypes is set, only groups of these groupTypes will be returned 
by listConsumerGroups().
+     * Otherwise, all groups are returned.
+     *
+     */
+    public ListConsumerGroupsOptions inTypes(Set<ConsumerGroupType> 
groupTypes) {

Review Comment:
   Ohh thanks yess I'll change it, sry was just following the method names we 
used with States for consistency but inTypes doesn't make sense like inStates 
does



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