commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1638384 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration2/builder/combined/ test/java/org/apache/commons/configuration2/builder/combined/
Date Tue, 11 Nov 2014 20:48:16 GMT
Author: oheger
Date: Tue Nov 11 20:48:16 2014
New Revision: 1638384

URL: http://svn.apache.org/r1638384
Log:
The configuration decoder is now taken into account when copying basic properties.

A sub combined configuration builder inherits the decoder property from its
parent.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilderProvider.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedConfigurationBuilder.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilderProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilderProvider.java?rev=1638384&r1=1638383&r2=1638384&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilderProvider.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilderProvider.java
Tue Nov 11 20:48:16 2014
@@ -128,6 +128,7 @@ public class CombinedConfigurationBuilde
     {
         params.setListDelimiterHandler(config.getListDelimiterHandler())
                 .setLogger(config.getLogger())
-                .setThrowExceptionOnMissing(config.isThrowExceptionOnMissing());
+                .setThrowExceptionOnMissing(config.isThrowExceptionOnMissing())
+                .setConfigurationDecoder(config.getConfigurationDecoder());
     }
 }

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedConfigurationBuilder.java?rev=1638384&r1=1638383&r2=1638384&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedConfigurationBuilder.java
Tue Nov 11 20:48:16 2014
@@ -40,6 +40,7 @@ import org.apache.commons.configuration2
 import org.apache.commons.configuration2.CombinedConfiguration;
 import org.apache.commons.configuration2.Configuration;
 import org.apache.commons.configuration2.ConfigurationAssert;
+import org.apache.commons.configuration2.ConfigurationDecoder;
 import org.apache.commons.configuration2.DynamicCombinedConfiguration;
 import org.apache.commons.configuration2.HierarchicalConfiguration;
 import org.apache.commons.configuration2.PropertiesConfiguration;
@@ -946,16 +947,19 @@ public class TestCombinedConfigurationBu
                 ConfigurationAssert
                         .getTestFile("testCCCombinedChildBuilder.xml");
         ListDelimiterHandler listHandler = new DefaultListDelimiterHandler('*');
+        ConfigurationDecoder decoder = EasyMock.createMock(ConfigurationDecoder.class);
         builder.configure(new CombinedBuilderParametersImpl()
                 .setDefinitionBuilderParameters(
                         new XMLBuilderParametersImpl().setFile(testFile))
-                .setListDelimiterHandler(listHandler));
+                .setListDelimiterHandler(listHandler)
+                .setConfigurationDecoder(decoder));
         CombinedConfiguration cc = builder.getConfiguration();
         CombinedConfiguration cc2 =
                 (CombinedConfiguration) cc.getConfiguration("subcc");
         assertFalse("Wrong exception flag", cc2.isThrowExceptionOnMissing());
         assertEquals("Wrong list delimiter handler", listHandler,
                 cc2.getListDelimiterHandler());
+        assertEquals("Wrong decoder", decoder, cc2.getConfigurationDecoder());
     }
 
     /**



Mime
View raw message