jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1431360 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java
Date Thu, 10 Jan 2013 13:49:00 GMT
Author: thomasm
Date: Thu Jan 10 13:49:00 2013
New Revision: 1431360

URL: http://svn.apache.org/viewvc?rev=1431360&view=rev
Log:
OAK-546 Query: unexpected result on negative limit / offset

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java?rev=1431360&r1=1431359&r2=1431360&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryImpl.java
Thu Jan 10 13:49:00 2013
@@ -114,11 +114,17 @@ public class QueryImpl implements Query 
 
     @Override
     public void setLimit(long limit) {
+        if (limit < 0) {
+            throw new IllegalArgumentException("Limit may not be negative, is: " + limit);
+        }
         this.limit = limit;
     }
 
     @Override
     public void setOffset(long offset) {
+        if (offset < 0) {
+            throw new IllegalArgumentException("Offset may not be negative, is: " + offset);
+        }
         this.offset = offset;
     }
 



Mime
View raw message