jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1409781 - 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 Thu, 15 Nov 2012 13:52:00 GMT
Author: mduerig
Date: Thu Nov 15 13:51:59 2012
New Revision: 1409781

URL: http://svn.apache.org/viewvc?rev=1409781&view=rev
Log:
OAK-448  Node builder for existing node return null for base state

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=1409781&r1=1409780&r2=1409781&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
Thu Nov 15 13:51:59 2012
@@ -24,7 +24,6 @@ import javax.annotation.Nonnull;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
-
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.spi.state.AbstractNodeState;
@@ -268,11 +267,12 @@ public class MemoryNodeBuilder implement
 
     @Override
     public boolean isModified() {
+        NodeState baseState = getBaseState();
         if (writeState == null) {
             return false;
         }
         else {
-            NodeState baseState = getBaseState();
+            Map<String, MutableNodeState> nodes = writeState.nodes;
             for (Entry<String, MutableNodeState> n : writeState.nodes.entrySet()) {
                 if (n.getValue() == null) {
                     return true;
@@ -308,6 +308,7 @@ public class MemoryNodeBuilder implement
 
     @Override
     public NodeState getBaseState() {
+        read();
         return baseState;
     }
 

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=1409781&r1=1409780&r2=1409781&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
Thu Nov 15 13:51:59 2012
@@ -157,7 +157,6 @@ public class MemoryNodeBuilderTest {
     }
 
     @Test
-    @Ignore("OAK-448")  // FIXME: OAK-448
     public void testUnmodifiedEqualsBase() {
         NodeBuilder root = new MemoryNodeBuilder(BASE);
         NodeBuilder x = root.child("x");



Mime
View raw message