MAILBOX-342 Enforce static method for setting XML, properties list separator

It has an impact in property readers and makes some reuseForks tests to fails.


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/5935abbb
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/5935abbb
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/5935abbb

Branch: refs/heads/master
Commit: 5935abbb7075325e36d470df5220b5c3b7a04095
Parents: e3a3f47
Author: benwa <btell...@linagora.com>
Authored: Wed Aug 1 11:46:03 2018 +0700
Committer: Matthieu Baechler <matth...@apache.org>
Committed: Wed Aug 1 14:32:02 2018 +0200

----------------------------------------------------------------------
 .../cassandra/init/configuration/ClusterConfiguration.java        | 2 +-
 .../server/core/configuration/FileConfigurationProvider.java      | 3 ++-
 .../apache/james/modules/mailbox/ElasticSearchConfiguration.java  | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/5935abbb/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/init/configuration/ClusterConfiguration.java
----------------------------------------------------------------------
diff --git 
a/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/init/configuration/ClusterConfiguration.java
 
b/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/init/configuration/ClusterConfiguration.java
index a4731d8..aa9d8f6 100644
--- 
a/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/init/configuration/ClusterConfiguration.java
+++ 
b/backends-common/cassandra/src/main/java/org/apache/james/backends/cassandra/init/configuration/ClusterConfiguration.java
@@ -176,7 +176,7 @@ public class ClusterConfiguration {
     }
 
     public static ClusterConfiguration from(PropertiesConfiguration 
configuration) {
-        configuration.setListDelimiter(',');
+        PropertiesConfiguration.setDefaultListDelimiter(',');
         return ClusterConfiguration.builder()
             .hosts(listCassandraServers(configuration))
             
.keyspace(Optional.ofNullable(configuration.getString(CASSANDRA_KEYSPACE, 
null)))

http://git-wip-us.apache.org/repos/asf/james-project/blob/5935abbb/server/container/core/src/main/java/org/apache/james/server/core/configuration/FileConfigurationProvider.java
----------------------------------------------------------------------
diff --git 
a/server/container/core/src/main/java/org/apache/james/server/core/configuration/FileConfigurationProvider.java
 
b/server/container/core/src/main/java/org/apache/james/server/core/configuration/FileConfigurationProvider.java
index 3559d03..911907e 100644
--- 
a/server/container/core/src/main/java/org/apache/james/server/core/configuration/FileConfigurationProvider.java
+++ 
b/server/container/core/src/main/java/org/apache/james/server/core/configuration/FileConfigurationProvider.java
@@ -26,6 +26,7 @@ import java.util.Optional;
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.HierarchicalConfiguration;
+import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.james.filesystem.api.FileSystem;
 import org.slf4j.Logger;
@@ -45,8 +46,8 @@ public class FileConfigurationProvider implements 
ConfigurationProvider {
     public static final HierarchicalConfiguration EMTY_CONFIGURATION = new 
HierarchicalConfiguration();
 
     public static XMLConfiguration getConfig(InputStream configStream) throws 
ConfigurationException {
+        PropertiesConfiguration.setDefaultListDelimiter(SEMICOLON);
         XMLConfiguration config = new XMLConfiguration();
-        config.setListDelimiter(SEMICOLON);
         config.setDelimiterParsingDisabled(true);
         config.setAttributeSplittingDisabled(true);
         config.load(configStream);

http://git-wip-us.apache.org/repos/asf/james-project/blob/5935abbb/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchConfiguration.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchConfiguration.java
 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchConfiguration.java
index b15b4d7..9332616 100644
--- 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchConfiguration.java
+++ 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/ElasticSearchConfiguration.java
@@ -280,7 +280,7 @@ public class ElasticSearchConfiguration {
     }
 
     private static ImmutableList<Host> getHosts(PropertiesConfiguration 
propertiesReader) throws ConfigurationException {
-        propertiesReader.setListDelimiter(',');
+        PropertiesConfiguration.setDefaultListDelimiter(',');
         Optional<String> masterHost = Optional.ofNullable(
             propertiesReader.getString(ELASTICSEARCH_MASTER_HOST, null));
         Optional<Integer> masterPort = Optional.ofNullable(


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to