mimaison commented on code in PR #15705:
URL: https://github.com/apache/kafka/pull/15705#discussion_r1565764251


##########
clients/src/main/java/org/apache/kafka/clients/admin/internals/CoordinatorStrategy.java:
##########
@@ -136,8 +136,8 @@ private CoordinatorKey 
requireSingletonAndType(Set<CoordinatorKey> keys) {
     }
 
     private void ensureSameType(Set<CoordinatorKey> keys) {
-        if (keys.size() < 1) {
-            throw new IllegalArgumentException("Unexpected size of key set: 
expected >= 1, but got " + keys.size());
+        if (keys.isEmpty()) {
+            throw new IllegalArgumentException("Unexpected size of key set: 
expected >= 1, but got 0");

Review Comment:
   It's the same really. I just simplified the error message but be a fixed 
string.



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