hongyeongjune commented on code in PR #14167: URL: https://github.com/apache/kafka/pull/14167#discussion_r1323044104
########## clients/src/main/java/org/apache/kafka/clients/admin/TransactionState.java: ########## @@ -49,8 +49,7 @@ public String toString() { } public static TransactionState parse(String name) { - TransactionState state = NAME_TO_ENUM.get(name); - return state == null ? UNKNOWN : state; + return NAME_TO_ENUM.getOrDefault(name, UNKNOWN); Review Comment: 👍 ########## clients/src/main/java/org/apache/kafka/clients/admin/TransactionState.java: ########## @@ -49,8 +49,7 @@ public String toString() { } public static TransactionState parse(String name) { - TransactionState state = NAME_TO_ENUM.get(name); - return state == null ? UNKNOWN : state; + return NAME_TO_ENUM.getOrDefault(name, UNKNOWN); Review Comment: 👍 -- 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