Copilot commented on code in PR #20070:
URL: https://github.com/apache/kafka/pull/20070#discussion_r2174665972


##########
streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestDriver.java:
##########
@@ -580,7 +587,7 @@ private static boolean verify(final PrintStream 
resultStream,
                     if (printResults) {
                         resultStream.printf("\t inputEvents=%n%s%n\t" +
                                 
"echoEvents=%n%s%n\tmaxEvents=%n%s%n\tminEvents=%n%s%n\tdifEvents=%n%s%n\tcntEvents=%n%s%n\ttaggEvents=%n%s%n",
-                            indent("\t\t", observedInputEvents.get(key)),
+                            indent("\t\t", 
observedInputEvents.getOrDefault(key, new LinkedList<>())),

Review Comment:
   Instead of creating a new LinkedList for each missing key, consider using 
Collections.emptyList() to avoid unnecessary allocations.



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