Serwios commented on code in PR #18107:
URL: https://github.com/apache/kafka/pull/18107#discussion_r1876516058


##########
clients/src/main/java/org/apache/kafka/clients/consumer/AcknowledgeType.java:
##########
@@ -44,15 +44,11 @@ public String toString() {
 
 
     public static AcknowledgeType forId(byte id) {
-        switch (id) {
-            case 1:
-                return ACCEPT;
-            case 2:
-                return RELEASE;
-            case 3:
-                return REJECT;
-            default:
-                throw new IllegalArgumentException("Unknown acknowledge type 
id: " + id);
-        }
+        return switch (id) {
+            case 1 -> ACCEPT;
+            case 2 -> RELEASE;
+            case 3 -> REJECT;
+            default -> throw new IllegalArgumentException("Unknown acknowledge 
type id: " + id);

Review Comment:
   Nice point, fixed in new commit



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