commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1388625 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/ main/java/org/apache/commons/configuration/beanutils/ test/java/org/apache/commons/configuration/
Date Fri, 21 Sep 2012 19:08:19 GMT
Author: oheger
Date: Fri Sep 21 19:08:18 2012
New Revision: 1388625

URL: http://svn.apache.org/viewvc?rev=1388625&view=rev
Log:
[CONFIGURATION-504] Changed return type of configurationsAt() method.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MultiFileHierarchicalConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/beanutils/XMLBeanDeclaration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestHierarchicalConfiguration.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java
Fri Sep 21 19:08:18 2012
@@ -745,8 +745,8 @@ public class DefaultConfigurationBuilder
      */
     protected void registerConfiguredProviders() throws ConfigurationException
     {
-        List<HierarchicalConfiguration> nodes = configurationsAt(KEY_CONFIGURATION_PROVIDERS);
-        for (HierarchicalConfiguration config : nodes)
+        List<SubnodeConfiguration> nodes = configurationsAt(KEY_CONFIGURATION_PROVIDERS);
+        for (SubnodeConfiguration config : nodes)
         {
             XMLBeanDeclaration decl = new XMLBeanDeclaration(config);
             String key = config.getString(KEY_PROVIDER_KEY);
@@ -762,8 +762,8 @@ public class DefaultConfigurationBuilder
      */
     protected void registerConfiguredLookups() throws ConfigurationException
     {
-        List<HierarchicalConfiguration> nodes = configurationsAt(KEY_CONFIGURATION_LOOKUPS);
-        for (HierarchicalConfiguration config : nodes)
+        List<SubnodeConfiguration> nodes = configurationsAt(KEY_CONFIGURATION_LOOKUPS);
+        for (SubnodeConfiguration config : nodes)
         {
             XMLBeanDeclaration decl = new XMLBeanDeclaration(config);
             String key = config.getString(KEY_LOOKUP_KEY);

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/DynamicCombinedConfiguration.java
Fri Sep 21 19:08:18 2012
@@ -610,7 +610,7 @@ public class DynamicCombinedConfiguratio
     }
 
     @Override
-    public List<HierarchicalConfiguration> configurationsAt(String key)
+    public List<SubnodeConfiguration> configurationsAt(String key)
     {
         return this.getCurrentConfig().configurationsAt(key);
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java
Fri Sep 21 19:08:18 2012
@@ -585,10 +585,10 @@ public class HierarchicalConfiguration e
      * configuration represents one of the nodes selected by the passed in key
      * @since 1.3
      */
-    public List<HierarchicalConfiguration> configurationsAt(String key)
+    public List<SubnodeConfiguration> configurationsAt(String key)
     {
         List<ConfigurationNode> nodes = fetchNodeList(key);
-        List<HierarchicalConfiguration> configs = new ArrayList<HierarchicalConfiguration>(nodes.size());
+        List<SubnodeConfiguration> configs = new ArrayList<SubnodeConfiguration>(nodes.size());
         for (ConfigurationNode node : nodes)
         {
             configs.add(createSubnodeConfiguration(node));

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MultiFileHierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MultiFileHierarchicalConfiguration.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MultiFileHierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/MultiFileHierarchicalConfiguration.java
Fri Sep 21 19:08:18 2012
@@ -511,7 +511,7 @@ public class MultiFileHierarchicalConfig
     }
 
     @Override
-    public List<HierarchicalConfiguration> configurationsAt(String key)
+    public List<SubnodeConfiguration> configurationsAt(String key)
     {
         return this.getConfiguration().configurationsAt(key);
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/PatternSubtreeConfigurationWrapper.java
Fri Sep 21 19:08:18 2012
@@ -388,7 +388,7 @@ public class PatternSubtreeConfiguration
     }
 
     @Override
-    public List<HierarchicalConfiguration> configurationsAt(String key)
+    public List<SubnodeConfiguration> configurationsAt(String key)
     {
         return config.configurationsAt(makePath(key));
     }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/beanutils/XMLBeanDeclaration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/beanutils/XMLBeanDeclaration.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/beanutils/XMLBeanDeclaration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/beanutils/XMLBeanDeclaration.java
Fri Sep 21 19:08:18 2012
@@ -394,17 +394,17 @@ public class XMLBeanDeclaration implemen
      */
     protected BeanDeclaration createBeanDeclaration(ConfigurationNode node)
     {
-        List<HierarchicalConfiguration> list = getConfiguration().configurationsAt(node.getName());
+        List<SubnodeConfiguration> list = getConfiguration().configurationsAt(node.getName());
         if (list.size() == 1)
         {
-            return new XMLBeanDeclaration((SubnodeConfiguration) list.get(0), node);
+            return new XMLBeanDeclaration(list.get(0), node);
         }
         else
         {
-            Iterator<HierarchicalConfiguration> iter = list.iterator();
+            Iterator<SubnodeConfiguration> iter = list.iterator();
             while (iter.hasNext())
             {
-                SubnodeConfiguration config = (SubnodeConfiguration) iter.next();
+                SubnodeConfiguration config = iter.next();
                 if (config.getRootNode().equals(node))
                 {
                     return new XMLBeanDeclaration(config, node);

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java
Fri Sep 21 19:08:18 2012
@@ -1131,11 +1131,11 @@ public class TestDefaultConfigurationBui
         CombinedConfiguration config = factory.getConfiguration(true);
         assertTrue("Incorrect configuration", config instanceof DynamicCombinedConfiguration);
 
-        List<HierarchicalConfiguration> list = config.configurationsAt("colors/*");
-        Iterator<HierarchicalConfiguration> iter = list.iterator();
+        List<SubnodeConfiguration> list = config.configurationsAt("colors/*");
+        Iterator<SubnodeConfiguration> iter = list.iterator();
         while (iter.hasNext())
         {
-            SubnodeConfiguration sub = (SubnodeConfiguration)iter.next();
+            SubnodeConfiguration sub = iter.next();
             ConfigurationNode node = sub.getRootNode();
             String value = (node.getValue() == null) ? "null" : node.getValue().toString();
             if (map.containsKey(node.getName()))

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestHierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestHierarchicalConfiguration.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestHierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestHierarchicalConfiguration.java
Fri Sep 21 19:08:18 2012
@@ -627,7 +627,7 @@ public class TestHierarchicalConfigurati
     @Test
     public void testConfigurationsAt()
     {
-        List<HierarchicalConfiguration> lstFlds = config.configurationsAt("tables.table(1).fields.field");
+        List<SubnodeConfiguration> lstFlds = config.configurationsAt("tables.table(1).fields.field");
         assertEquals("Wrong size of fields", fields[1].length, lstFlds.size());
         for (int i = 0; i < fields[1].length; i++)
         {

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java?rev=1388625&r1=1388624&r2=1388625&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java
Fri Sep 21 19:08:18 2012
@@ -1174,7 +1174,7 @@ public class TestXMLConfiguration
     public void testConfigurationsAtWithReload() throws ConfigurationException
     {
         XMLConfiguration c = setUpReloadTest();
-        List<HierarchicalConfiguration> configs = c.configurationsAt("test");
+        List<SubnodeConfiguration> configs = c.configurationsAt("test");
         assertEquals("New value not read", "newValue",
                 configs.get(0).getString("entity"));
     }



Mime
View raw message