ppkarwasz commented on code in PR #3235:
URL: https://github.com/apache/logging-log4j2/pull/3235#discussion_r1856039544


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java:
##########
@@ -513,7 +512,7 @@ public Logger getLogger(final String name) {
      * @return a collection of the current loggers.
      */
     public Collection<Logger> getLoggers() {
-        return loggerRegistry.getLoggers().collect(Collectors.toList());
+        return loggerRegistry.getLoggers();

Review Comment:
   `Collectors.toList()` does make a copy, right?
   
   I could add a test for that in case the implementation of 
`InternalLoggerRegistry.getLoggers()` changes



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