mirkoalicastro commented on code in PR #22122:
URL: https://github.com/apache/kafka/pull/22122#discussion_r3243637344
##########
clients/src/main/java/org/apache/kafka/common/Uuid.java:
##########
@@ -189,8 +185,6 @@ public static Uuid[] toArray(List<Uuid> list) {
*/
public static List<Uuid> toList(Uuid[] array) {
if (array == null) return null;
- List<Uuid> list = new ArrayList<>(array.length);
- list.addAll(Arrays.asList(array));
- return list;
+ return new ArrayList<>(Arrays.asList(array));
Review Comment:
@smjn with Arrays.asList it's not possible to add items to the collection.
That's why I made it like that.
--
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]