You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2015/05/10 22:22:26 UTC

svn commit: r1678636 - /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java

Author: oheger
Date: Sun May 10 20:22:26 2015
New Revision: 1678636

URL: http://svn.apache.org/r1678636
Log:
Fixed some Checkstyle warnings, missing @Override annotations.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java?rev=1678636&r1=1678635&r2=1678636&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java Sun May 10 20:22:26 2015
@@ -109,11 +109,13 @@ public class InMemoryNodeModel implement
      * {@code NodeHandler} interface itself. So this implementation just returns
      * the <strong>this</strong> reference.
      */
+    @Override
     public NodeHandler<ImmutableNode> getNodeHandler()
     {
         return getReferenceNodeHandler();
     }
 
+    @Override
     public void addProperty(String key, Iterable<?> values,
             NodeKeyResolver<ImmutableNode> resolver)
     {
@@ -130,6 +132,7 @@ public class InMemoryNodeModel implement
      * @param key the key
      * @param selector the {@code NodeSelector} defining the root node (or
      *        <b>null</b>)
+     * @param values the values to be added
      * @param resolver the {@code NodeKeyResolver}
      * @throws ConfigurationRuntimeException if the selector cannot be resolved
      */
@@ -141,6 +144,7 @@ public class InMemoryNodeModel implement
         {
             updateModel(new TransactionInitializer()
             {
+                @Override
                 public boolean initTransaction(ModelTransaction tx)
                 {
                     initializeAddTransaction(tx, key, values, resolver);
@@ -150,6 +154,7 @@ public class InMemoryNodeModel implement
         }
     }
 
+    @Override
     public void addNodes(String key, Collection<? extends ImmutableNode> nodes,
             NodeKeyResolver<ImmutableNode> resolver)
     {
@@ -178,6 +183,7 @@ public class InMemoryNodeModel implement
         {
             updateModel(new TransactionInitializer()
             {
+                @Override
                 public boolean initTransaction(ModelTransaction tx)
                 {
                     List<QueryResult<ImmutableNode>> results =
@@ -213,6 +219,7 @@ public class InMemoryNodeModel implement
         }
     }
 
+    @Override
     public void setProperty(String key, Object value,
             NodeKeyResolver<ImmutableNode> resolver)
     {
@@ -238,6 +245,7 @@ public class InMemoryNodeModel implement
     {
         updateModel(new TransactionInitializer()
         {
+            @Override
             public boolean initTransaction(ModelTransaction tx)
             {
                 boolean added = false;
@@ -267,6 +275,7 @@ public class InMemoryNodeModel implement
      * removed, too. Return value is a collection with {@code QueryResult}
      * objects for the elements to be removed from the model.
      */
+    @Override
     public List<QueryResult<ImmutableNode>> clearTree(String key,
             NodeKeyResolver<ImmutableNode> resolver)
     {
@@ -294,6 +303,7 @@ public class InMemoryNodeModel implement
                 new LinkedList<QueryResult<ImmutableNode>>();
         updateModel(new TransactionInitializer()
         {
+            @Override
             public boolean initTransaction(ModelTransaction tx)
             {
                 boolean changes = false;
@@ -334,6 +344,7 @@ public class InMemoryNodeModel implement
      * {@inheritDoc} If this operation leaves an affected node in an undefined
      * state, it is removed from the model.
      */
+    @Override
     public void clearProperty(String key,
             NodeKeyResolver<ImmutableNode> resolver)
     {
@@ -356,8 +367,11 @@ public class InMemoryNodeModel implement
     public void clearProperty(final String key, NodeSelector selector,
             final NodeKeyResolver<ImmutableNode> resolver)
     {
-        updateModel(new TransactionInitializer() {
-            public boolean initTransaction(ModelTransaction tx) {
+        updateModel(new TransactionInitializer()
+        {
+            @Override
+            public boolean initTransaction(ModelTransaction tx)
+            {
                 List<QueryResult<ImmutableNode>> results =
                         resolver.resolveKey(tx.getQueryRoot(), key,
                                 tx.getCurrentData());
@@ -373,6 +387,7 @@ public class InMemoryNodeModel implement
      *
      * @param resolver the {@code NodeKeyResolver}
      */
+    @Override
     public void clear(NodeKeyResolver<ImmutableNode> resolver)
     {
         ImmutableNode newRoot =
@@ -400,6 +415,7 @@ public class InMemoryNodeModel implement
      * @param newRoot the new root node to be set (can be <b>null</b>, then an
      *        empty root node is set)
      */
+    @Override
     public void setRootNode(ImmutableNode newRoot)
     {
         structure.set(createTreeData(initialRootNode(newRoot), structure.get()));
@@ -799,6 +815,7 @@ public class InMemoryNodeModel implement
         NodeTreeWalker.INSTANCE.walkBFS(root,
                 new ConfigurationNodeVisitorAdapter<ImmutableNode>()
                 {
+                    @Override
                     public void visitBeforeChildren(ImmutableNode node,
                             NodeHandler<ImmutableNode> handler)
                     {
@@ -1383,7 +1400,7 @@ public class InMemoryNodeModel implement
      * {@code TreeData} is attempted. If this fails - because another update
      * came across -, the whole operation has to be tried anew.
      */
-    private static interface TransactionInitializer
+    private interface TransactionInitializer
     {
         /**
          * Initializes the specified transaction for an update operation. The