diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java index 2d4be39bff..bfa6c406a6 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java @@ -308,22 +308,23 @@ public class ConfigurationImpl implements Configuration, Serializable { @Override public Configuration parseSystemProperties(Properties properties) throws Exception { + synchronized (properties) { + Map beanProperties = new HashMap<>(); - Map beanProperties = new HashMap<>(); - - for (Map.Entry entry : properties.entrySet()) { - if (entry.getKey().toString().startsWith(systemPropertyPrefix)) { - String key = entry.getKey().toString().substring(systemPropertyPrefix.length()); - logger.debug("Setting up config, " + key + "=" + entry.getValue()); - beanProperties.put(key, entry.getValue()); + for (Map.Entry entry : properties.entrySet()) { + if (entry.getKey().toString().startsWith(systemPropertyPrefix)) { + String key = entry.getKey().toString().substring(systemPropertyPrefix.length()); + logger.debug("Setting up config, " + key + "=" + entry.getValue()); + beanProperties.put(key, entry.getValue()); + } } - } - if (!beanProperties.isEmpty()) { - BeanSupport.setData(this, beanProperties); - } + if (!beanProperties.isEmpty()) { + BeanSupport.setData(this, beanProperties); + } - return this; + return this; + } } @Override