commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1575761 - in /commons/proper/configuration/branches/immutableNodes/src: main/java/org/apache/commons/configuration/tree/ test/java/org/apache/commons/configuration/tree/
Date Sun, 09 Mar 2014 21:00:33 GMT
Author: oheger
Date: Sun Mar  9 21:00:32 2014
New Revision: 1575761

URL: http://svn.apache.org/r1575761
Log:
Renamed TreeData.getRoot() to getRootNode().

This is in sync with other classes.

Modified:
    commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/InMemoryNodeModel.java
    commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/TreeData.java
    commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/NodeStructureHelper.java
    commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/TestTreeData.java

Modified: commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/InMemoryNodeModel.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/InMemoryNodeModel.java?rev=1575761&r1=1575760&r2=1575761&view=diff
==============================================================================
--- commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/InMemoryNodeModel.java
(original)
+++ commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/InMemoryNodeModel.java
Sun Mar  9 21:00:32 2014
@@ -86,7 +86,7 @@ public class InMemoryNodeModel implement
 
     public ImmutableNode getRootNode()
     {
-        return getTreeData().getRoot();
+        return getTreeData().getRootNode();
     }
 
     /**
@@ -124,7 +124,7 @@ public class InMemoryNodeModel implement
                 public boolean initTransaction(ModelTransaction tx)
                 {
                     List<QueryResult<ImmutableNode>> results =
-                            resolver.resolveKey(tx.getCurrentData().getRoot(),
+                            resolver.resolveKey(tx.getCurrentData().getRootNode(),
                                     key, tx.getCurrentData());
                     if (results.size() == 1)
                     {
@@ -138,7 +138,7 @@ public class InMemoryNodeModel implement
                     {
                         NodeAddData<ImmutableNode> addData =
                                 resolver.resolveAddKey(tx.getCurrentData()
-                                        .getRoot(), key, tx.getCurrentData());
+                                        .getRootNode(), key, tx.getCurrentData());
                         if (addData.isAttribute())
                         {
                             throw attributeKeyException(key);
@@ -166,7 +166,7 @@ public class InMemoryNodeModel implement
                 boolean added = false;
                 NodeUpdateData<ImmutableNode> updateData =
                         resolver.resolveUpdateKey(
-                                tx.getCurrentData().getRoot(), key, value,
+                                tx.getCurrentData().getRootNode(), key, value,
                                 tx.getCurrentData());
                 if (!updateData.getNewValues().isEmpty())
                 {
@@ -199,7 +199,7 @@ public class InMemoryNodeModel implement
             {
                 TreeData currentStructure = tx.getCurrentData();
                 for (QueryResult<ImmutableNode> result : resolver
-                        .resolveKey(currentStructure.getRoot(), key,
+                        .resolveKey(currentStructure.getRootNode(), key,
                                 tx.getCurrentData()))
                 {
                     if (result.isAttributeResult())
@@ -209,7 +209,7 @@ public class InMemoryNodeModel implement
                     }
                     else
                     {
-                        if (result.getNode() == currentStructure.getRoot())
+                        if (result.getNode() == currentStructure.getRootNode())
                         {
                             // the whole model is to be cleared
                             clear();
@@ -237,7 +237,7 @@ public class InMemoryNodeModel implement
             public boolean initTransaction(ModelTransaction tx)
             {
                 List<QueryResult<ImmutableNode>> results =
-                        resolver.resolveKey(tx.getCurrentData().getRoot(), key,
+                        resolver.resolveKey(tx.getCurrentData().getRootNode(), key,
                                 tx.getCurrentData());
                 initializeClearTransaction(tx, results);
                 return true;
@@ -295,7 +295,7 @@ public class InMemoryNodeModel implement
         {
             TreeData current = structure.get();
             NodeTracker newTracker =
-                    current.getNodeTracker().trackNode(current.getRoot(),
+                    current.getNodeTracker().trackNode(current.getRootNode(),
                             selector, resolver, current);
             done =
                     structure.compareAndSet(current,
@@ -426,7 +426,7 @@ public class InMemoryNodeModel implement
             Iterable<?> values, NodeKeyResolver<ImmutableNode> resolver)
     {
         NodeAddData<ImmutableNode> addData =
-                resolver.resolveAddKey(tx.getCurrentData().getRoot(), key,
+                resolver.resolveAddKey(tx.getCurrentData().getRootNode(), key,
                         tx.getCurrentData());
         if (addData.isAttribute())
         {

Modified: commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/TreeData.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/TreeData.java?rev=1575761&r1=1575760&r2=1575761&view=diff
==============================================================================
--- commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/TreeData.java
(original)
+++ commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/tree/TreeData.java
Sun Mar  9 21:00:32 2014
@@ -80,7 +80,7 @@ class TreeData implements NodeHandler<Im
      *
      * @return the current root node
      */
-    public ImmutableNode getRoot()
+    public ImmutableNode getRootNode()
     {
         return root;
     }
@@ -185,7 +185,7 @@ class TreeData implements NodeHandler<Im
      */
     public ImmutableNode getParent(ImmutableNode node)
     {
-        if (node == getRoot())
+        if (node == getRootNode())
         {
             return null;
         }

Modified: commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/NodeStructureHelper.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/NodeStructureHelper.java?rev=1575761&r1=1575760&r2=1575761&view=diff
==============================================================================
--- commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/NodeStructureHelper.java
(original)
+++ commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/NodeStructureHelper.java
Sun Mar  9 21:00:32 2014
@@ -295,7 +295,7 @@ public class NodeStructureHelper
      */
     public static ImmutableNode nodeForKey(TreeData td, String key)
     {
-        return nodeForKey(td.getRoot(), key);
+        return nodeForKey(td.getRootNode(), key);
     }
 
     /**

Modified: commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/TestTreeData.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/TestTreeData.java?rev=1575761&r1=1575760&r2=1575761&view=diff
==============================================================================
--- commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/TestTreeData.java
(original)
+++ commons/proper/configuration/branches/immutableNodes/src/test/java/org/apache/commons/configuration/tree/TestTreeData.java
Sun Mar  9 21:00:32 2014
@@ -61,11 +61,11 @@ public class TestTreeData
         for (int authorIdx = 0; authorIdx < NodeStructureHelper.authorsLength(); authorIdx++)
         {
             ImmutableNode authorNode =
-                    nodeForKey(treeData.getRoot(),
+                    nodeForKey(treeData.getRootNode(),
                             NodeStructureHelper.author(authorIdx));
             assertSame(
                     "Wrong parent for " + NodeStructureHelper.author(authorIdx),
-                    treeData.getRoot(), treeData.getParent(authorNode));
+                    treeData.getRootNode(), treeData.getParent(authorNode));
             for (int workIdx = 0; workIdx < NodeStructureHelper
                     .worksLength(authorIdx); workIdx++)
             {
@@ -74,7 +74,7 @@ public class TestTreeData
                                 NodeStructureHelper.author(authorIdx),
                                 NodeStructureHelper.work(authorIdx, workIdx));
                 ImmutableNode workNode =
-                        nodeForKey(treeData.getRoot(), workKey);
+                        nodeForKey(treeData.getRootNode(), workKey);
                 assertSame("Wrong parent for " + workKey, authorNode,
                         treeData.getParent(workNode));
                 for (int personaIdx = 0; personaIdx < NodeStructureHelper
@@ -85,7 +85,7 @@ public class TestTreeData
                                     NodeStructureHelper.persona(authorIdx,
                                             workIdx, personaIdx));
                     ImmutableNode personNode =
-                            nodeForKey(treeData.getRoot(), personKey);
+                            nodeForKey(treeData.getRootNode(), personKey);
                     assertSame("Wrong parent for " + personKey, workNode,
                             treeData.getParent(personNode));
                 }



Mime
View raw message