mirror of https://github.com/apache/maven.git
Added synchronization around copying system properties since they are a singleton,
fix for [MRRESOURCES-65] and similar problem in assembly
This commit is contained in:
parent
a18f5af192
commit
4da87163f9
|
@ -165,8 +165,11 @@ public class DefaultProjectBuildingRequest
|
||||||
if ( systemProperties != null )
|
if ( systemProperties != null )
|
||||||
{
|
{
|
||||||
this.systemProperties = new Properties();
|
this.systemProperties = new Properties();
|
||||||
|
synchronized ( systemProperties )
|
||||||
|
{ // avoid concurrentmodification if someone else sets/removes an unrelated system property
|
||||||
this.systemProperties.putAll( systemProperties );
|
this.systemProperties.putAll( systemProperties );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.systemProperties.clear();
|
this.systemProperties.clear();
|
||||||
|
|
Loading…
Reference in New Issue