sebastien-doyon commented on code in PR #1220: URL: https://github.com/apache/maven/pull/1220#discussion_r1312983567
########## maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java: ########## @@ -301,20 +305,22 @@ private void callDelegates( } private Set<String> populateRealm(ClassRealm classRealm, List<ClassRealmConstituent> constituents) { - Set<String> includedIds = new LinkedHashSet<>(); + Set<String> includedIds = Collections.emptySet(); Review Comment: What is your concerns? The **includedIds** reference a collection that stays local to the methods **populateRealm** and **createRealm**, it is not escaping the class and is not an instance variable. The set is only modified if the logger debug log level is enabled (line 319 and 321), it is set with a LinkedHashSet on the same condition (lines 310 and 311). I see no point of creating a LinkedHashSet if the log level is not at least debug since this collection is only used for logging purpose. What do you think according to this? -- 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: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org