This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit c8daabca78483ec1f5587cbfcb0915b475b875b3
Author: Tran Tien Duc <[email protected]>
AuthorDate: Mon Aug 19 11:37:37 2019 +0700

    JAMES-2855 Use proper method to read properties data
---
 .../SwiftKeystone2ConfigurationReaderTest.java     | 14 ++---
 .../SwiftKeystone3ConfigurationReaderTest.java     | 22 +++----
 .../SwiftTmpAuthConfigurationReaderTest.java       | 16 ++---
 .../mailbox/TikaConfigurationReaderTest.java       | 68 ++++++++++++----------
 .../james/modules/server/JmxConfigurationTest.java |  8 +--
 5 files changed, 67 insertions(+), 61 deletions(-)

diff --git 
a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftKeystone2ConfigurationReaderTest.java
 
b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftKeystone2ConfigurationReaderTest.java
index 0fbf3c1..55d1b09 100644
--- 
a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftKeystone2ConfigurationReaderTest.java
+++ 
b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftKeystone2ConfigurationReaderTest.java
@@ -26,7 +26,7 @@ import java.io.StringReader;
 import java.net.URI;
 import java.util.Optional;
 
-import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.configuration2.PropertiesConfiguration;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.james.blob.objectstorage.swift.Credentials;
 import org.apache.james.blob.objectstorage.swift.Region;
@@ -60,7 +60,7 @@ class SwiftKeystone2ConfigurationReaderTest {
     @Test
     void readBasicKeystone2Configuration() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -79,7 +79,7 @@ class SwiftKeystone2ConfigurationReaderTest {
     @Test
     void readKeystone2ConfigurationWithRegion() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -100,7 +100,7 @@ class SwiftKeystone2ConfigurationReaderTest {
     @Test
     void failToReadSwiftKeystone2ConfigurationWhenMissingEndpoint() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
             CONFIG_TENANT_NAME,
@@ -113,7 +113,7 @@ class SwiftKeystone2ConfigurationReaderTest {
     @Test
     void failToReadSwiftKeystone2ConfigurationWhenMissingCrendentials() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_USER_NAME,
             CONFIG_TENANT_NAME,
@@ -126,7 +126,7 @@ class SwiftKeystone2ConfigurationReaderTest {
     @Test
     void failToReadSwiftKeystone2ConfigurationWhenMissingUserName() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_TENANT_NAME,
@@ -139,7 +139,7 @@ class SwiftKeystone2ConfigurationReaderTest {
     @Test
     void failToReadSwiftKeystone2ConfigurationWhenMissingTenantName() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
diff --git 
a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftKeystone3ConfigurationReaderTest.java
 
b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftKeystone3ConfigurationReaderTest.java
index b590ef8..1cc8d2b 100644
--- 
a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftKeystone3ConfigurationReaderTest.java
+++ 
b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftKeystone3ConfigurationReaderTest.java
@@ -26,7 +26,7 @@ import java.io.StringReader;
 import java.net.URI;
 import java.util.Optional;
 
-import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.configuration2.PropertiesConfiguration;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.james.blob.objectstorage.swift.Credentials;
 import org.apache.james.blob.objectstorage.swift.DomainId;
@@ -78,7 +78,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void readUnscopedKeystone3Configuration() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -96,7 +96,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void readUnscopedKeystone3ConfigurationWithRegion() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -116,7 +116,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void failsToReadKeystone3ConfigurationWithoutEndpoint() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
             CONFIG_USER_DOMAIN_NAME)));
@@ -127,7 +127,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void failsToReadKeystone3ConfigurationWithoutCredentials() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_USER_NAME,
             CONFIG_USER_DOMAIN_NAME)));
@@ -138,7 +138,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void failsToReadKeystone3ConfigurationWithoutUserName() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_DOMAIN_NAME)));
@@ -149,7 +149,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void failsToReadKeystone3ConfigurationWithoutUserDomainName() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME)));
@@ -160,7 +160,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void readDomainScopedKeystone3Configuration() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -180,7 +180,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void readProjectScopedKeystone3Configuration() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -202,7 +202,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void readProjectOfDomainNameScopedKeystone3Configuration() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -229,7 +229,7 @@ class SwiftKeystone3ConfigurationReaderTest {
     @Test
     void readProjectOfDomainIdScopedKeystone3Configuration() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
diff --git 
a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftTmpAuthConfigurationReaderTest.java
 
b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftTmpAuthConfigurationReaderTest.java
index c719a01..6b4638b 100644
--- 
a/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftTmpAuthConfigurationReaderTest.java
+++ 
b/server/container/guice/blob-objectstorage-guice/src/test/java/org/apache/james/modules/objectstorage/SwiftTmpAuthConfigurationReaderTest.java
@@ -26,7 +26,7 @@ import java.io.StringReader;
 import java.net.URI;
 import java.util.Optional;
 
-import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.configuration2.PropertiesConfiguration;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.james.blob.objectstorage.swift.Credentials;
 import org.apache.james.blob.objectstorage.swift.PassHeaderName;
@@ -70,7 +70,7 @@ class SwiftTmpAuthConfigurationReaderTest {
     @Test
     void readBasicTempAuthConfiguration() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -89,7 +89,7 @@ class SwiftTmpAuthConfigurationReaderTest {
     @Test
     void readTempAuthConfigurationWithRegion() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -110,7 +110,7 @@ class SwiftTmpAuthConfigurationReaderTest {
     @Test
     void readTempAuthConfigurationWithCustomTempAuthHeaders() throws Exception 
{
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
@@ -133,7 +133,7 @@ class SwiftTmpAuthConfigurationReaderTest {
     @Test
     void failToReadSwiftTempAuthConfigurationWhenMissingEndpoint() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
             CONFIG_TENANT_NAME,
@@ -146,7 +146,7 @@ class SwiftTmpAuthConfigurationReaderTest {
     @Test
     void failToReadSwiftTempAuthConfigurationWhenMissingCrendentials() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_USER_NAME,
             CONFIG_TENANT_NAME,
@@ -159,7 +159,7 @@ class SwiftTmpAuthConfigurationReaderTest {
     @Test
     void failToReadSwiftTempAuthConfigurationWhenMissingUserName() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_TENANT_NAME,
@@ -172,7 +172,7 @@ class SwiftTmpAuthConfigurationReaderTest {
     @Test
     void failToReadSwiftTempAuthConfigurationWhenMissingTenantName() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(StringUtils.joinWith("\n",
+        configuration.read(new StringReader(StringUtils.joinWith("\n",
             CONFIG_ENDPOINT,
             CONFIG_CREDENTIALS,
             CONFIG_USER_NAME,
diff --git 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
index 3ab5fe2..03b8a99 100644
--- 
a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
+++ 
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/modules/mailbox/TikaConfigurationReaderTest.java
@@ -24,8 +24,8 @@ import static org.assertj.core.api.Assertions.assertThat;
 import java.io.StringReader;
 import java.time.Duration;
 
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.configuration2.PropertiesConfiguration;
+import org.apache.commons.configuration2.convert.DefaultListDelimiterHandler;
 import org.apache.james.mailbox.tika.TikaConfiguration;
 import org.junit.Test;
 
@@ -35,8 +35,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void readTikaConfigurationShouldAcceptMandatoryValues() throws 
Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
                 "tika.enabled=true\n" +
             "tika.host=172.0.0.5\n" +
             "tika.port=889\n" +
@@ -57,8 +57,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void readTikaConfigurationShouldReturnDefaultOnMissingHost() throws 
Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
             "tika.port=889\n" +
             "tika.timeoutInMillis=500\n"));
@@ -75,8 +75,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void readTikaConfigurationShouldReturnDefaultOnMissingPort() throws 
Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
             "tika.host=172.0.0.5\n" +
             "tika.timeoutInMillis=500\n"));
@@ -93,8 +93,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void readTikaConfigurationShouldReturnDefaultOnMissingTimeout() 
throws Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
             "tika.host=172.0.0.5\n" +
             "tika.port=889\n"));
@@ -111,8 +111,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void tikaShouldBeDisabledByDefault() throws Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(""));
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(""));
 
         
assertThat(TikaConfigurationReader.readTikaConfiguration(configuration))
             .isEqualTo(
@@ -123,8 +123,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void readTikaConfigurationShouldParseUnitForCacheEvictionPeriod() 
throws Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
             "tika.host=172.0.0.5\n" +
             "tika.port=889\n" +
@@ -144,8 +144,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void 
readTikaConfigurationShouldDefaultToSecondWhenMissingUnitForCacheEvitionPeriod()
 throws Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
             "tika.host=172.0.0.5\n" +
             "tika.port=889\n" +
@@ -165,8 +165,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void readTikaConfigurationShouldParseUnitForCacheWeightMax() throws 
Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
             "tika.host=172.0.0.5\n" +
             "tika.port=889\n" +
@@ -186,8 +186,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void readTikaConfigurationShouldDefaultToByteAsSizeUnit() throws 
Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
             "tika.host=172.0.0.5\n" +
             "tika.port=889\n" +
@@ -207,8 +207,8 @@ public class TikaConfigurationReaderTest {
 
     @Test
     public void readTikaConfigurationShouldEnableCacheWhenConfigured() throws 
Exception {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
             "tika.cache.enabled=true\n" +
             "tika.host=172.0.0.5\n" +
@@ -229,9 +229,9 @@ public class TikaConfigurationReaderTest {
     }
 
     @Test
-    public void readTikaConfigurationShouldNotHaveContentTypeBlacklist() 
throws ConfigurationException {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+    public void readTikaConfigurationShouldNotHaveContentTypeBlacklist() 
throws Exception {
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
                 "tika.cache.enabled=true\n" +
                 "tika.host=172.0.0.5\n" +
@@ -252,9 +252,9 @@ public class TikaConfigurationReaderTest {
     }
 
     @Test
-    public void readTikaConfigurationShouldHaveContentTypeBlacklist() throws 
ConfigurationException {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+    public void readTikaConfigurationShouldHaveContentTypeBlacklist() throws 
Exception {
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
                 "tika.cache.enabled=true\n" +
                 "tika.host=172.0.0.5\n" +
@@ -277,9 +277,9 @@ public class TikaConfigurationReaderTest {
     }
 
     @Test
-    public void 
readTikaConfigurationShouldHaveContentTypeBlacklistWithWhiteSpace() throws 
ConfigurationException {
-        PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+    public void 
readTikaConfigurationShouldHaveContentTypeBlacklistWithWhiteSpace() throws 
Exception {
+        PropertiesConfiguration configuration = newConfiguration();
+        configuration.read(new StringReader(
             "tika.enabled=true\n" +
                 "tika.cache.enabled=true\n" +
                 "tika.host=172.0.0.5\n" +
@@ -300,4 +300,10 @@ public class TikaConfigurationReaderTest {
                     .contentTypeBlacklist(ImmutableSet.of("application/ics", 
"application/zip"))
                     .build());
     }
+
+    private PropertiesConfiguration newConfiguration() {
+        PropertiesConfiguration configuration = new PropertiesConfiguration();
+        configuration.setListDelimiterHandler(new 
DefaultListDelimiterHandler(','));
+        return configuration;
+    }
 }
\ No newline at end of file
diff --git 
a/server/container/guice/jmx/src/test/java/org/apache/james/modules/server/JmxConfigurationTest.java
 
b/server/container/guice/jmx/src/test/java/org/apache/james/modules/server/JmxConfigurationTest.java
index 604d4f6..ce125ac 100644
--- 
a/server/container/guice/jmx/src/test/java/org/apache/james/modules/server/JmxConfigurationTest.java
+++ 
b/server/container/guice/jmx/src/test/java/org/apache/james/modules/server/JmxConfigurationTest.java
@@ -24,7 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import java.io.StringReader;
 import java.util.Optional;
 
-import org.apache.commons.configuration.PropertiesConfiguration;
+import org.apache.commons.configuration2.PropertiesConfiguration;
 import org.apache.james.util.Host;
 import org.junit.jupiter.api.Test;
 
@@ -46,7 +46,7 @@ public class JmxConfigurationTest {
     @Test
     void fromPropertiesShouldReturnConfiguredValues() throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        configuration.read(new StringReader(
                 "jmx.address=172.0.0.5\n" +
                 "jmx.port=889\n"));
 
@@ -57,7 +57,7 @@ public class JmxConfigurationTest {
     @Test
     void fromPropertiesShouldReturnDisabledWhenConfiguredAsDisabled() throws 
Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        configuration.read(new StringReader(
                     "jmx.enabled=false\n"));
 
         assertThat(JmxConfiguration.fromProperties(configuration))
@@ -67,7 +67,7 @@ public class JmxConfigurationTest {
     @Test
     void fromPropertiesShouldReturnDisabledWhenConfiguredAsDisabledWithHost() 
throws Exception {
         PropertiesConfiguration configuration = new PropertiesConfiguration();
-        configuration.load(new StringReader(
+        configuration.read(new StringReader(
                     "jmx.enabled=false\n" +
                 "jmx.address=172.0.0.5\n" +
                 "jmx.port=889\n"));


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to