jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1220416 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
Date Sun, 18 Dec 2011 14:45:33 GMT
Author: mduerig
Date: Sun Dec 18 14:45:33 2011
New Revision: 1220416

URL: http://svn.apache.org/viewvc?rev=1220416&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
minor clean up

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java?rev=1220416&r1=1220415&r2=1220416&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
Sun Dec 18 14:45:33 2011
@@ -957,8 +957,10 @@ public class NodeEntry extends Hierarchy
        // for existing nodeEntry that are 'moved' for the first time, the
        // original data must be stored and this entry is moved to the attic.
        if (transientMove) {
-           createRevertInfo();
            if (Status.NEW != getStatus()) {
+               if (revertInfo == null) {
+                   revertInfo = new RevertInfo();
+               }
                if (newParent == revertInfo.oldParent) {
                    // entry is either rename OR moved back to it's original
                    // parent. for the latter case make sure, there is no attic
@@ -1169,7 +1171,7 @@ public class NodeEntry extends Hierarchy
         }
         if (child == null) {
             child = childNodeAttic.get(childName);
-            if (child == null && childNodeEntries != null) {
+            if (child == null) {
                 child = childNodeEntries.get(childName);
             }
         }
@@ -1284,16 +1286,6 @@ public class NodeEntry extends Hierarchy
                         sibling.revertInfo != null && Path.INDEX_DEFAULT == childIndex);
     }
 
-    /**
-     * If 'revertInfo' is null it gets created from the current information
-     * present on this entry.
-     */
-    private void createRevertInfo() {
-        if (revertInfo == null && getStatus() != Status.NEW) {
-            revertInfo = new RevertInfo();
-        }
-    }
-
     private void complete(AddNode operation) throws RepositoryException {
         if (operation.getParentState().getHierarchyEntry() != this) {
             IllegalArgumentException e = new IllegalArgumentException("Invalid operation
target");



Mime
View raw message