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


##########
clients/src/main/java/org/apache/kafka/clients/admin/AlterClientQuotasOptions.java:
##########
@@ -19,6 +19,8 @@
 
 import org.apache.kafka.common.annotation.InterfaceStability;
 
+import java.util.Collection;

Review Comment:
   where are we using this in this file?
   
   (same for other imports)



##########
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:
   we are creating an intermediate data structure (list) here in the new code. 
It might not be worth it.
   
   (same for other places where we use Arrays.asList)



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