Make optionalData() static 47/20847/4
authorRobert Varga <rovarga@cisco.com>
Wed, 20 May 2015 19:55:40 +0000 (21:55 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 21 May 2015 17:55:07 +0000 (17:55 +0000)
This private utility method does not touch the object, hence make it
static.

Change-Id: Ifc50b713792cd3e8096173dbdaf3cdb41b9f42e2
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/AbstractModifiedNodeBasedCandidateNode.java

index 93e0e671eda7e72ac8a4d73efa53f4ebb2e39fd4..a69fe4aa6ece6cd86d96959198a6ed66a379a64e 100644 (file)
@@ -53,7 +53,7 @@ abstract class AbstractModifiedNodeBasedCandidateNode implements DataTreeCandida
         return oldMeta;
     }
 
-    private static final TreeNode childMeta(final TreeNode parent, final PathArgument id) {
+    private static TreeNode childMeta(final TreeNode parent, final PathArgument id) {
         if (parent != null) {
             return parent.getChild(id).orNull();
         } else {
@@ -118,7 +118,7 @@ abstract class AbstractModifiedNodeBasedCandidateNode implements DataTreeCandida
         return Verify.verifyNotNull(mod.getModificationType(), "Node %s does not have resolved modification type", mod);
     }
 
-    private Optional<NormalizedNode<?, ?>> optionalData(final TreeNode meta) {
+    private static Optional<NormalizedNode<?, ?>> optionalData(final TreeNode meta) {
         if (meta != null) {
             return Optional.<NormalizedNode<?,?>>of(meta.getData());
         } else {