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:
Kristian Rosenvold 2014-06-20 17:14:38 +02:00
parent a18f5af192
commit 4da87163f9
1 changed files with 4 additions and 1 deletions

View File

@ -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();