commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r639727 - in /commons/proper/configuration/branches/configuration2_experimental/src: main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java
Date Fri, 21 Mar 2008 17:45:08 GMT
Author: oheger
Date: Fri Mar 21 10:45:05 2008
New Revision: 639727

URL: http://svn.apache.org/viewvc?rev=639727&view=rev
Log:
Let the configurationAt() methods return a SubConfiguration rather than an AbstractHierarchicalConfiguration

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java?rev=639727&r1=639726&r2=639727&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
Fri Mar 21 10:45:05 2008
@@ -273,7 +273,7 @@
      * @return a hierarchical configuration that contains this sub tree
      * @see SubConfiguration
      */
-    public AbstractHierarchicalConfiguration<T> configurationAt(String key, boolean
supportUpdates)
+    public SubConfiguration<T> configurationAt(String key, boolean supportUpdates)
     {
         NodeList<T> nodes = fetchNodeList(key);
         if (nodes.size() != 1 || !nodes.isNode(0))
@@ -292,7 +292,7 @@
      * @return a hierarchical configuration that contains this sub tree
      * @see SubConfiguration
      */
-    public AbstractHierarchicalConfiguration<T> configurationAt(String key)
+    public SubConfiguration<T> configurationAt(String key)
     {
         return configurationAt(key, false);
     }
@@ -323,10 +323,10 @@
      * @return a list with hierarchical configuration objects; each
      * configuration represents one of the nodes selected by the passed in key
      */
-    public List<AbstractHierarchicalConfiguration<T>> configurationsAt(String
key)
+    public List<SubConfiguration<T>> configurationsAt(String key)
     {
         NodeList<T> nodes = fetchNodeList(key);
-        List<AbstractHierarchicalConfiguration<T>> configs = new ArrayList<AbstractHierarchicalConfiguration<T>>(
+        List<SubConfiguration<T>> configs = new ArrayList<SubConfiguration<T>>(
                 nodes.size());
         for (int index = 0; index < nodes.size(); index++)
         {

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java?rev=639727&r1=639726&r2=639727&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestInMemoryConfiguration.java
Fri Mar 21 10:45:05 2008
@@ -568,7 +568,7 @@
      */
     public void testConfigurationsAt()
     {
-        List<AbstractHierarchicalConfiguration<ConfigurationNode>> lstFlds =
config.configurationsAt("tables.table(1).fields.field");
+        List<SubConfiguration<ConfigurationNode>> 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++)
         {



Mime
View raw message