Author: chetanm
Date: Wed Oct 19 15:13:06 2016
New Revision: 1765653

URL: http://svn.apache.org/viewvc?rev=1765653&view=rev
Log:
OAK-1312 -  [bundling] Bundle nodes into a document

Based on Marcel feedback passing bundlingContext itself

Modified:
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java?rev=1765653&r1=1765652&r2=1765653&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeState.java
 Wed Oct 19 15:13:06 2016
@@ -150,8 +150,7 @@ public class DocumentNodeState extends A
         if (rootRevision.equals(root) && fromExternalChange == externalChange) 
{
             return this;
         } else {
-            return new DocumentNodeState(store, path, root, 
bundlingContext.getAllProperties(),
-                    hasChildren, lastRevision, externalChange);
+            return new DocumentNodeState(store, path, lastRevision, root, 
externalChange, bundlingContext);
         }
     }
 
@@ -161,8 +160,7 @@ public class DocumentNodeState extends A
      */
     @Nonnull
     public DocumentNodeState fromExternalChange() {
-        return new DocumentNodeState(store, path, rootRevision, 
bundlingContext.getAllProperties(), hasChildren,
-                lastRevision, true);
+        return new DocumentNodeState(store, path, lastRevision, rootRevision, 
true, bundlingContext);
     }
 
     /**
@@ -767,7 +765,7 @@ public class DocumentNodeState extends A
         public BundlingContext(Matcher matcher, Map<String, PropertyState> 
rootProperties,
                                boolean hasBundledChildren, boolean 
hasNonBundledChildren) {
             this.matcher = matcher;
-            this.rootProperties = rootProperties;
+            this.rootProperties = ImmutableMap.copyOf(rootProperties);
             this.hasBundledChildren = hasBundledChildren;
             this.hasNonBundledChildren = hasNonBundledChildren;
         }


Reply via email to