jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1299744 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit: mk/store/StoredNodeAsState.java oak/model/NodeState.java
Date Mon, 12 Mar 2012 17:20:26 GMT
Author: mduerig
Date: Mon Mar 12 17:20:26 2012
New Revision: 1299744

URL: http://svn.apache.org/viewvc?rev=1299744&view=rev
Log:
OAK-10: Impedance mismatch between signatures of NodeState#getChildeNodeEntries and MicroKernel#getNodes

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/store/StoredNodeAsState.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/model/NodeState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/store/StoredNodeAsState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/store/StoredNodeAsState.java?rev=1299744&r1=1299743&r2=1299744&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/store/StoredNodeAsState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/store/StoredNodeAsState.java
Mon Mar 12 17:20:26 2012
@@ -16,10 +16,6 @@
  */
 package org.apache.jackrabbit.mk.store;
 
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
 import org.apache.jackrabbit.mk.model.Id;
 import org.apache.jackrabbit.mk.model.StoredNode;
 import org.apache.jackrabbit.oak.model.AbstractChildNodeEntry;
@@ -29,6 +25,10 @@ import org.apache.jackrabbit.oak.model.C
 import org.apache.jackrabbit.oak.model.NodeState;
 import org.apache.jackrabbit.oak.model.PropertyState;
 
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+
 class StoredNodeAsState extends AbstractNodeState {
 
     private final StoredNode node;
@@ -123,18 +123,14 @@ class StoredNodeAsState extends Abstract
 
     @Override
     public Iterable<ChildNodeEntry> getChildNodeEntries(
-            final long offset, final long length) {
-        if (length < -1) {
-            throw new IllegalArgumentException("Illegal length: " + length);
+            final long offset, final int count) {
+        if (count < -1) {
+            throw new IllegalArgumentException("Illegal count: " + count);
         } else if (offset > Integer.MAX_VALUE) {
             return Collections.emptyList();
         } else {
             return new Iterable<ChildNodeEntry>() {
                 public Iterator<ChildNodeEntry> iterator() {
-                    int count = -1;
-                    if (length < Integer.MAX_VALUE) {
-                        count = (int) length;
-                    }
                     final Iterator<org.apache.jackrabbit.mk.model.ChildNodeEntry> iterator
=
                             node.getChildNodeEntries((int) offset, count);
                     return new Iterator<ChildNodeEntry>() {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/model/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/model/NodeState.java?rev=1299744&r1=1299743&r2=1299744&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/model/NodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/model/NodeState.java
Mon Mar 12 17:20:26 2012
@@ -150,10 +150,10 @@ public interface NodeState {
      * offset is greater than the offset of the last child node entry.
      *
      * @param offset zero-based offset of the first entry to return
-     * @param length maximum number of entries to return,
+     * @param count  maximum number of entries to return,
      *               or -1 for all remaining entries
      * @return requested child node entries in some stable order
      */
-    Iterable<? extends ChildNodeEntry> getChildNodeEntries(long offset, long length);
+    Iterable<? extends ChildNodeEntry> getChildNodeEntries(long offset, int count);
 
 }



Mime
View raw message