Fix yang-data-impl code smells
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / tree / SchemaAwareApplyOperation.java
index daad9fcf95957dd64c9afe648a5fb5a29b3ead0c..fbd63bdc4faa6c92bc82a7e8a3902535b1d916d1 100644 (file)
@@ -155,8 +155,10 @@ abstract class SchemaAwareApplyOperation extends ModificationApplyOperation {
              * it should not cause transaction to fail, since result of this merge
              * leads to same data.
              */
-            if (!original.get().getData().equals(current.get().getData())) {
-                checkNotConflicting(path, original.get(), current.get());
+            final TreeNode orig = original.get();
+            final TreeNode cur = current.get();
+            if (!orig.getData().equals(cur.getData())) {
+                checkNotConflicting(path, orig, cur);
             }
         }
     }