jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1468568 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
Date Tue, 16 Apr 2013 19:16:28 GMT
Author: jukka
Date: Tue Apr 16 19:16:28 2013
New Revision: 1468568

URL: http://svn.apache.org/r1468568
Log:
OAK-778: Recursive wrapping of ModifiedNodeState

Minor improvement

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.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=1468568&r1=1468567&r2=1468568&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
Tue Apr 16 19:16:28 2013
@@ -22,7 +22,6 @@ import java.util.Map.Entry;
 
 import javax.annotation.Nonnull;
 
-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;
@@ -33,7 +32,6 @@ import org.apache.jackrabbit.oak.spi.sta
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.base.Preconditions.checkState;
-import static com.google.common.collect.Lists.newArrayList;
 import static com.google.common.collect.Maps.newHashMap;
 import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
 import static org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.with;
@@ -507,7 +505,7 @@ public class MemoryNodeBuilder implement
         }
 
         public NodeState snapshot() {
-            Map<String, NodeState> nodes = Maps.newHashMap();
+            Map<String, NodeState> nodes = newHashMap();
             for (Map.Entry<String, MutableNodeState> entry : this.nodes.entrySet())
{
                 String name = entry.getKey();
                 MutableNodeState node = entry.getValue();
@@ -523,7 +521,7 @@ public class MemoryNodeBuilder implement
                     }
                 }
             }
-            return with(base, Maps.newHashMap(this.properties), nodes);
+            return with(base, newHashMap(this.properties), nodes);
         }
 
         void reset(NodeState newBase) {
@@ -591,8 +589,8 @@ public class MemoryNodeBuilder implement
 
         @Override @Nonnull
         public Iterable<String> getChildNodeNames() {
-            Map<String, MutableNodeState> copy = Maps.newHashMap(nodes);
-            return newArrayList(withNodes(base, copy).getChildNodeNames());
+            Map<String, MutableNodeState> copy = newHashMap(nodes);
+            return withNodes(base, copy).getChildNodeNames();
         }
 
         @Override @Nonnull



Mime
View raw message