qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject [qpid-broker-j] branch 7.1.x updated: QPID-8289: [Broker-J] Broker startup can fail due to ConcurrentModificationException
Date Sun, 11 Aug 2019 14:19:45 GMT
This is an automated email from the ASF dual-hosted git repository.

orudyy pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new e6e6722  QPID-8289: [Broker-J] Broker startup can fail due to ConcurrentModificationException
e6e6722 is described below

commit e6e67224bef8af0cbebb1fa312e052cacb2da038
Author: overmeulen <overmeulen@murex.com>
AuthorDate: Thu Aug 1 16:22:49 2019 +0200

    QPID-8289: [Broker-J] Broker startup can fail due to ConcurrentModificationException
    
    This closes #33
    
    (cherry picked from commit 4abddaccaf9be7095324cfa3c48de13882b2ec2e)
---
 .../java/org/apache/qpid/server/model/AbstractConfiguredObject.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
b/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
index f7b77f1..267356c 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
@@ -3505,7 +3505,8 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>>
im
         if(!excludeSystem)
         {
             inheritedContext.putAll(System.getenv());
-            inheritedContext.putAll((Map) System.getProperties());
+            //clone is synchronized and will avoid ConcurrentModificationException
+            inheritedContext.putAll((Map) System.getProperties().clone());
         }
         generateInheritedContext(getModel(), this, inheritedContext);
         return Collections.unmodifiableSet(inheritedContext.keySet());


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message