jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1400427 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
Date Sat, 20 Oct 2012 12:27:18 GMT
Author: jukka
Date: Sat Oct 20 12:27:18 2012
New Revision: 1400427

URL: http://svn.apache.org/viewvc?rev=1400427&view=rev
Log:
OAK-170: Child node state builder

Add getChildNode() so we don't hit the slow default implementation in AbstractNodeState

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=1400427&r1=1400426&r2=1400427&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
Sat Oct 20 12:27:18 2012
@@ -508,6 +508,18 @@ public class MemoryNodeBuilder implement
         }
 
         @Override
+        public NodeState getChildNode(String name) {
+            MutableNodeState node = nodes.get(name);
+            if (node != null) {
+                return node;
+            } else if (nodes.containsKey(name)) {
+                return null;
+            }
+
+            return base.getChildNode(name);
+        }
+
+        @Override
         public Iterable<String> getChildNodeNames() {
             if (nodes.isEmpty()) {
                 return base.getChildNodeNames(); // shortcut



Mime
View raw message