You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by if...@apache.org on 2014/07/30 05:30:19 UTC
git commit: MNG-5670 guard against ConcurrentModificationException
iterating over System properties
Repository: maven
Updated Branches:
refs/heads/master 61c374042 -> e3000a09c
MNG-5670 guard against ConcurrentModificationException iterating over System properties
Signed-off-by: Igor Fedorenko <if...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/e3000a09
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/e3000a09
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/e3000a09
Branch: refs/heads/master
Commit: e3000a09c94396d7fd7d65fc236904aa07c7f7f2
Parents: 61c3740
Author: Igor Fedorenko <if...@apache.org>
Authored: Wed Jul 30 07:28:12 2014 +0400
Committer: Igor Fedorenko <if...@apache.org>
Committed: Wed Jul 30 07:28:12 2014 +0400
----------------------------------------------------------------------
.../maven/repository/internal/MavenRepositorySystemUtils.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/e3000a09/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
----------------------------------------------------------------------
diff --git a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
index b7ed320..dbc4b86 100644
--- a/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
+++ b/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
@@ -126,7 +126,12 @@ public final class MavenRepositorySystemUtils
session.setArtifactDescriptorPolicy( new SimpleArtifactDescriptorPolicy( true, true ) );
- Properties sysProps = System.getProperties();
+ // MNG-5670 guard against ConcurrentModificationException
+ Properties sysProps = new Properties();
+ for ( String key : System.getProperties().stringPropertyNames() )
+ {
+ sysProps.put( key, System.getProperty( key ) );
+ }
session.setSystemProperties( sysProps );
session.setConfigProperties( sysProps );