jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1487343 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Date Wed, 29 May 2013 07:00:53 GMT
Author: jukka
Date: Wed May 29 07:00:52 2013
New Revision: 1487343

URL: http://svn.apache.org/r1487343
Log:
OAK-843: Optimization in the Node#hasNodes()

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1487343&r1=1487342&r2=1487343&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Wed May 29 07:00:52 2013
@@ -765,12 +765,7 @@ public class NodeImpl<T extends NodeDele
 
     @Override
     public boolean hasNodes() throws RepositoryException {
-        return perform(new ItemReadOperation<Boolean>() {
-            @Override
-            public Boolean perform() throws RepositoryException {
-                return dlg.getChildCount() != 0;
-            }
-        });
+        return getNodes().hasNext();
     }
 
     @Override



Mime
View raw message