jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1468923 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
Date Wed, 17 Apr 2013 14:10:57 GMT
Author: mduerig
Date: Wed Apr 17 14:10:57 2013
New Revision: 1468923

URL: http://svn.apache.org/r1468923
Log:
OAK-781: Clarify / fix effects of MISSING_NODE as base state of NodeBuilder
remove failing assertion that does not hold anymore since the introduction of the exists semantics
on node states. Extend test case

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java?rev=1468923&r1=1468922&r2=1468923&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
Wed Apr 17 14:10:57 2013
@@ -147,9 +147,7 @@ public class MemoryNodeBuilder implement
     private boolean classInvariants() {
         boolean rootHasNoParent = isRoot() == (parent == null);
         boolean rootHasWriteState = root.writeState != null;
-        boolean baseStateOrWriteStateNotNull = baseState.exists() || writeState != null;
-
-        return rootHasNoParent && rootHasWriteState && baseStateOrWriteStateNotNull;
+        return rootHasNoParent && rootHasWriteState;
     }
 
     private boolean isRoot() {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java?rev=1468923&r1=1468922&r2=1468923&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilderTest.java
Wed Apr 17 14:10:57 2013
@@ -213,6 +213,11 @@ public class MemoryNodeBuilderTest {
 
         // No assertion must fail in .child("c")
         rootBuilder.child("a").child("b").child("c");
+
+        rootBuilder = new MemoryNodeBuilder(r);
+
+        // No assertion must fail in .child("c")
+        rootBuilder.child("a").child("b").child("c");
     }
 
     @Test



Mime
View raw message