commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1643923 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java test/java/org/apache/commons/configuration2/TestDynamicCombinedConfiguration.java
Date Mon, 08 Dec 2014 21:05:23 GMT
Author: oheger
Date: Mon Dec  8 21:05:23 2014
New Revision: 1643923

URL: http://svn.apache.org/r1643923
Log:
[CONFIGURATION-200] Provided a specialized size() implementation for DynamicCombinedConfiguration.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestDynamicCombinedConfiguration.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java?rev=1643923&r1=1643922&r2=1643923&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java
Mon Dec  8 21:05:23 2014
@@ -608,6 +608,11 @@ public class DynamicCombinedConfiguratio
     }
 
     @Override
+    protected int sizeInternal() {
+        return this.getCurrentConfig().size();
+    }
+
+    @Override
     protected void setPropertyInternal(String key, Object value)
     {
         if (configs != null)

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestDynamicCombinedConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestDynamicCombinedConfiguration.java?rev=1643923&r1=1643922&r2=1643923&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestDynamicCombinedConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/TestDynamicCombinedConfiguration.java
Mon Dec  8 21:05:23 2014
@@ -119,6 +119,7 @@ public class TestDynamicCombinedConfigur
         assertEquals("OK-1", config.getString("buttons/name"));
         assertEquals(3, config.getMaxIndex("buttons/name"));
         assertEquals("a\\,b\\,c", config.getString("split/list2"));
+        assertEquals("Wrong size", 18, config.size());
         config.addProperty("listDelimiterTest", "1,2,3");
         assertEquals("List delimiter not detected", "1", config.getString("listDelimiterTest"));
     }



Mime
View raw message