jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1446706 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Date Fri, 15 Feb 2013 17:39:25 GMT
Author: mduerig
Date: Fri Feb 15 17:39:25 2013
New Revision: 1446706

URL: http://svn.apache.org/r1446706
Log:
simplify

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java?rev=1446706&r1=1446705&r2=1446706&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Fri Feb 15 17:39:25 2013
@@ -229,10 +229,9 @@ public class TreeImpl implements Tree {
             return Status.DISCONNECTED;
         }
 
-        NodeBuilder builder = nodeBuilder;
-        if (builder.isNew()) {
+        if (nodeBuilder.isNew()) {
             return Status.NEW;
-        } else if (builder.isModified()) {
+        } else if (nodeBuilder.isModified()) {
             return Status.MODIFIED;
         } else {
             return Status.EXISTING;
@@ -315,10 +314,10 @@ public class TreeImpl implements Tree {
         }
 
         if (!isRoot() && parent.hasChild(name)) {
-            NodeBuilder builder = parent.nodeBuilder;
-            builder.removeNode(name);
+            NodeBuilder parentBuilder = parent.nodeBuilder;
+            parentBuilder.removeNode(name);
             if (parent.hasOrderableChildren()) {
-                builder.setProperty(
+                parentBuilder.setProperty(
                         MemoryPropertyBuilder.copy(Type.STRING, parent.internalGetProperty(OAK_CHILD_ORDER))
                                 .removeValue(name)
                                 .getPropertyState()
@@ -379,32 +378,28 @@ public class TreeImpl implements Tree {
     @Override
     public void setProperty(PropertyState property) {
         root.checkLive();
-        NodeBuilder builder = nodeBuilder;
-        builder.setProperty(property);
+        nodeBuilder.setProperty(property);
         root.updated();
     }
 
     @Override
     public <T> void setProperty(String name, T value) {
         root.checkLive();
-        NodeBuilder builder = nodeBuilder;
-        builder.setProperty(name, value);
+        nodeBuilder.setProperty(name, value);
         root.updated();
     }
 
     @Override
     public <T> void setProperty(String name, T value, Type<T> type) {
         root.checkLive();
-        NodeBuilder builder = nodeBuilder;
-        builder.setProperty(name, value, type);
+        nodeBuilder.setProperty(name, value, type);
         root.updated();
     }
 
     @Override
     public void removeProperty(String name) {
         root.checkLive();
-        NodeBuilder builder = nodeBuilder;
-        builder.removeProperty(name);
+        nodeBuilder.removeProperty(name);
         root.updated();
     }
 



Mime
View raw message