dajac commented on code in PR #15152:
URL: https://github.com/apache/kafka/pull/15152#discussion_r1467690595
##########
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:
Yeah, we don't have to change it here as it is not related. The minimum to
do here is to also build a Map within the enum to do the lookup. It is better
to be consistent.
--
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]