clolov commented on code in PR #13212:
URL: https://github.com/apache/kafka/pull/13212#discussion_r1099881594


##########
clients/src/main/java/org/apache/kafka/common/utils/Utils.java:
##########
@@ -779,8 +779,7 @@ public static ByteBuffer ensureCapacity(ByteBuffer 
existingBuffer, int newLength
     @SafeVarargs
     public static <T> Set<T> mkSet(T... elems) {
         Set<T> result = new HashSet<>((int) (elems.length / 0.75) + 1);
-        for (T elem : elems)
-            result.add(elem);
+        result.addAll(Arrays.asList(elems));

Review Comment:
   Yeah, the tests failed yesterday, so I will be reverting that particular 
commit



##########
clients/src/main/java/org/apache/kafka/common/utils/Utils.java:
##########
@@ -779,8 +779,7 @@ public static ByteBuffer ensureCapacity(ByteBuffer 
existingBuffer, int newLength
     @SafeVarargs
     public static <T> Set<T> mkSet(T... elems) {
         Set<T> result = new HashSet<>((int) (elems.length / 0.75) + 1);
-        for (T elem : elems)
-            result.add(elem);
+        result.addAll(Arrays.asList(elems));

Review Comment:
   Yeah, the tests failed yesterday as well, so I will be reverting that 
particular 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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to