gsmet commented on code in PR #335: URL: https://github.com/apache/maven-compiler-plugin/pull/335#discussion_r2124261488
########## src/main/java/org/apache/maven/plugin/compiler/DeltaList.java: ########## @@ -33,10 +33,8 @@ final class DeltaList<E> { private final boolean hasChanged; DeltaList(Collection<E> oldList, Collection<E> newList) { - this.added = new ArrayList<>(newList); - this.removed = new ArrayList<>(oldList); - added.removeAll(oldList); - removed.removeAll(newList); + this.added = newList.stream().filter(i -> !oldList.contains(i)).collect(Collectors.toList()); + this.removed = oldList.stream().filter(i -> !newList.contains(i)).collect(Collectors.toList()); Review Comment: The idea is to use ``HashSet``s and avoid copying then removing a lot of elements. -- 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