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


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/Group.java:
##########
@@ -40,6 +42,29 @@ enum GroupType {
         public String toString() {
             return name;
         }
+
+        /**
+         * Parse a string into the corresponding {@code GroupType} enum value, 
in a case-insensitive manner.
+         *
+         * @return The {{@link GroupType}} according to the string passed.
+         *
+         * @throws IllegalArgumentException If the input string does not match 
any {@code GroupType}.
+         */
+        public static GroupType parse(String typeString) {
+            for (GroupType type : GroupType.values()) {

Review Comment:
   Haha honestly there's no good reason, I used the existing implementation for 
states as inspiration in the client side one and I just implemented it 
differently here. I can use the reverse lookup here too.
   



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