jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1309458 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Date Wed, 04 Apr 2012 15:36:49 GMT
Author: stefan
Date: Wed Apr  4 15:36:49 2012
New Revision: 1309458

URL: http://svn.apache.org/viewvc?rev=1309458&view=rev
Log:
optimized getChildNode

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java?rev=1309458&r1=1309457&r2=1309458&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Wed Apr  4 15:36:49 2012
@@ -20,7 +20,6 @@ package org.apache.jackrabbit.oak.kernel
 
 import org.apache.jackrabbit.mk.model.Scalar;
 import org.apache.jackrabbit.mk.api.MicroKernel;
-import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.mk.json.JsopReader;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
 import org.apache.jackrabbit.mk.model.AbstractNodeState;
@@ -141,11 +140,8 @@ class KernelNodeState extends AbstractNo
         NodeState child = childNodes.get(name);
         if (child == null && childNodeCount > MAX_CHILD_NODE_NAMES) {
             String childPath = getChildPath(name);
-            try {
-                kernel.getNodes(childPath, revision, 0, 0, 0, null);
+            if (kernel.nodeExists(childPath, revision)) {
                 child = new KernelNodeState(kernel, childPath, revision);
-            } catch (MicroKernelException e) {
-                // FIXME: Better way to determine whether a child node exists
             }
         }
         return child;



Mime
View raw message