commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r619162 - in /commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2: HierarchicalConfiguration.java tree/ExpressionEngine.java tree/NodeAddData.java
Date Wed, 06 Feb 2008 21:40:47 GMT
Author: oheger
Date: Wed Feb  6 13:40:46 2008
New Revision: 619162

URL: http://svn.apache.org/viewvc?rev=619162&view=rev
Log:
Java 1.5-related changes

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java?rev=619162&r1=619161&r2=619162&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java
Wed Feb  6 13:40:46 2008
@@ -1078,9 +1078,9 @@
         ConfigurationNode node = data.getParent();
 
         // Create missing nodes on the path
-        for (Iterator it = data.getPathNodes().iterator(); it.hasNext();)
+        for (String nodeName : data.getPathNodes())
         {
-            ConfigurationNode child = createNode((String) it.next());
+            ConfigurationNode child = createNode(nodeName);
             node.addChild(child);
             node = child;
         }

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java?rev=619162&r1=619161&r2=619162&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java
Wed Feb  6 13:40:46 2008
@@ -59,7 +59,7 @@
      * @return a list with the nodes that are matched by the key (should never
      * be <b>null</b>)
      */
-    List query(ConfigurationNode root, String key);
+    List<ConfigurationNode> query(ConfigurationNode root, String key);
 
     /**
      * Returns the key for the specified node in the expression language

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java?rev=619162&r1=619161&r2=619162&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java
Wed Feb  6 13:40:46 2008
@@ -57,7 +57,7 @@
      * Stores a list with nodes that are on the path between the parent node and
      * the new node.
      */
-    private List pathNodes;
+    private List<String> pathNodes;
 
     /** Stores the name of the new node. */
     private String newNodeName;
@@ -163,10 +163,16 @@
      * @return a list with the names of nodes that must be added as parents of
      * the new node (never <b>null</b>)
      */
-    public List getPathNodes()
+    public List<String> getPathNodes()
     {
-        return (pathNodes != null) ? Collections.unmodifiableList(pathNodes)
-                : Collections.EMPTY_LIST;
+        if (pathNodes != null)
+        {
+            return Collections.unmodifiableList(pathNodes);
+        }
+        else
+        {
+            return Collections.emptyList();
+        }
     }
 
     /**
@@ -180,7 +186,7 @@
     {
         if (pathNodes == null)
         {
-            pathNodes = new LinkedList();
+            pathNodes = new LinkedList<String>();
         }
         pathNodes.add(nodeName);
     }



Mime
View raw message