This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/master by this push:
new f2e9432a44 Fix a `ConcurrentModificationException` (#11428)
f2e9432a44 is described below
commit f2e9432a44a32d20362cc1afba077e0b23dc9c10
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Mon Nov 10 21:15:50 2025 +0100
Fix a `ConcurrentModificationException` (#11428)
The exception was observed in the integration tests of Maven Compiler
Plugin when Maven is executed with the `-T4` option.
---
.../main/java/org/apache/maven/impl/DefaultDependencyResolver.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java
index d29c3f369a..4e955f0901 100644
---
a/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java
+++
b/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolver.java
@@ -21,11 +21,11 @@
import java.io.IOException;
import java.nio.file.Path;
import java.util.Collection;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Predicate;
import java.util.stream.Collectors;
@@ -85,7 +85,7 @@ public class DefaultDependencyResolver implements
DependencyResolver {
*/
public DefaultDependencyResolver() {
// TODO: the cache should not be instantiated here, but should rather
be session-wide.
- moduleCaches = new HashMap<>();
+ moduleCaches = new ConcurrentHashMap<>();
}
/**