commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1502865 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/builder/combined/ test/java/org/apache/commons/configuration/builder/combined/ test/resources/
Date Sat, 13 Jul 2013 19:40:49 GMT
Author: oheger
Date: Sat Jul 13 19:40:49 2013
New Revision: 1502865

URL: http://svn.apache.org/r1502865
Log:
Correctly initialized result configurations with the list delimiter handler.

Initialization of old list delimiter properties is no longer needed. Instead
the list delimiter handler from the result configuration has to be set for
the additional configuration. Test cases were adapted.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/combined/CombinedConfigurationBuilder.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java
    commons/proper/configuration/trunk/src/test/resources/testCCResultInitialization.xml

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/combined/CombinedConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/combined/CombinedConfigurationBuilder.java?rev=1502865&r1=1502864&r2=1502865&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/combined/CombinedConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/builder/combined/CombinedConfigurationBuilder.java
Sat Jul 13 19:40:49 2013
@@ -834,8 +834,7 @@ public class CombinedConfigurationBuilde
     {
         CombinedConfiguration addConfig =
                 new CombinedConfiguration(new UnionCombiner());
-        addConfig.setDelimiterParsingDisabled(resultConfig
-                .isDelimiterParsingDisabled());
+        addConfig.setListDelimiterHandler(resultConfig.getListDelimiterHandler());
         return addConfig;
     }
 

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java?rev=1502865&r1=1502864&r2=1502865&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/builder/combined/TestCombinedConfigurationBuilder.java
Sat Jul 13 19:40:49 2013
@@ -524,8 +524,11 @@ public class TestCombinedConfigurationBu
      */
     private static void checkCombinedConfigAttrs(CombinedConfiguration cc)
     {
-        assertTrue("Wrong delimiter parsing flag",
-                cc.isDelimiterParsingDisabled());
+        ListDelimiterHandler handler = cc.getListDelimiterHandler();
+        assertTrue("Wrong delimiter handler: " + handler,
+                handler instanceof DefaultListDelimiterHandler);
+        assertEquals("Wrong list delimiter character", ',',
+                ((DefaultListDelimiterHandler) handler).getDelimiter());
     }
 
     /**

Modified: commons/proper/configuration/trunk/src/test/resources/testCCResultInitialization.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/resources/testCCResultInitialization.xml?rev=1502865&r1=1502864&r2=1502865&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/resources/testCCResultInitialization.xml (original)
+++ commons/proper/configuration/trunk/src/test/resources/testCCResultInitialization.xml Sat
Jul 13 19:40:49 2013
@@ -20,7 +20,11 @@
 -->
 <configuration>
   <header>
-    <result delimiterParsingDisabled="true">
+    <result>
+      <listDelimiterHandler
+        config-class="org.apache.commons.configuration.DefaultListDelimiterHandler">
+        <config-constrarg config-value=","/>
+      </listDelimiterHandler>
       <nodeCombiner config-class="org.apache.commons.configuration.tree.OverrideCombiner"/>
       <expressionEngine config-class="org.apache.commons.configuration.tree.xpath.XPathExpressionEngine"/>
     </result>



Mime
View raw message