mirror of https://github.com/apache/maven.git
MNG-5670 guard against ConcurrentModificationException iterating over System properties
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
This commit is contained in:
parent
61c3740425
commit
e3000a09c9
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue