AndrewJSchofield commented on code in PR #19508:
URL: https://github.com/apache/kafka/pull/19508#discussion_r2063142470


##########
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java:
##########
@@ -3541,27 +3541,29 @@ ListGroupsRequest.Builder createRequest(int timeoutMs) {
                         }
 
                         private void 
maybeAddGroup(ListGroupsResponseData.ListedGroup group) {
-                            final String groupId = group.groupId();
-                            final Optional<GroupType> type;
-                            if (group.groupType() == null || 
group.groupType().isEmpty()) {
-                                type = Optional.empty();
-                            } else {
-                                type = 
Optional.of(GroupType.parse(group.groupType()));
-                            }
-                            final String protocolType = group.protocolType();
-                            final Optional<GroupState> groupState;
-                            if (group.groupState() == null || 
group.groupState().isEmpty()) {
-                                groupState = Optional.empty();
-                            } else {
-                                groupState = 
Optional.of(GroupState.parse(group.groupState()));
+                            String protocolType = group.protocolType();
+                            if (options.protocolTypes().isEmpty() || 
options.protocolTypes().contains(protocolType)) {

Review Comment:
   Yes, and that might be worthwhile in the future. I decided not to in this 
KIP.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to