jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1412572 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java
Date Thu, 22 Nov 2012 14:56:21 GMT
Author: thomasm
Date: Thu Nov 22 14:56:20 2012
New Revision: 1412572

URL: http://svn.apache.org/viewvc?rev=1412572&view=rev
Log:
OAK-308 NodeIterator limit and offset don't work as expected

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java?rev=1412572&r1=1412571&r2=1412572&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/Query.java
Thu Nov 22 14:56:20 2012
@@ -331,7 +331,8 @@ public class Query {
                 // rows in the same order
                     
                 // avoid overflow (both offset and limit could be Long.MAX_VALUE)
-                int keep = (int) (Math.min(Integer.MAX_VALUE, offset) + 
+                int keep = (int) Math.min(Integer.MAX_VALUE, 
+                        Math.min(Integer.MAX_VALUE, offset) + 
                         Math.min(Integer.MAX_VALUE, limit));
                 
                 ArrayList<ResultRowImpl> list = new ArrayList<ResultRowImpl>();



Mime
View raw message