jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r618603 - /jackrabbit/branches/1.4/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/QueryResultNodeIteratorTest.java
Date Tue, 05 Feb 2008 10:33:00 GMT
Author: jukka
Date: Tue Feb  5 02:32:59 2008
New Revision: 618603

URL: http://svn.apache.org/viewvc?rev=618603&view=rev
Log:
1.4: Merged revision 614177 (JCR-1335)

Modified:
    jackrabbit/branches/1.4/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/QueryResultNodeIteratorTest.java

Modified: jackrabbit/branches/1.4/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/QueryResultNodeIteratorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/QueryResultNodeIteratorTest.java?rev=618603&r1=618602&r2=618603&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/QueryResultNodeIteratorTest.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/QueryResultNodeIteratorTest.java
Tue Feb  5 02:32:59 2008
@@ -121,7 +121,8 @@
      * Tests if {@link javax.jcr.NodeIterator#skip(long)} works correctly.
      */
     public void testSkip() throws RepositoryException {
-        QueryResult rs = execute(testPath + "//*", Query.XPATH);
+        String query = testPath + "//*";
+        QueryResult rs = execute(query, Query.XPATH);
         NodeIterator it = rs.getNodes();
 
         // find out if there is anything we can skip
@@ -131,7 +132,8 @@
             count++;
         }
         if (count > 1) {
-            // re-aquire iterator
+            // re-execute the query
+            rs = execute(query, Query.XPATH);
             it = rs.getNodes();
             // skip all but one
             it.skip(count - 1);
@@ -144,7 +146,8 @@
                 // success
             }
 
-            // re-aquire iterator
+            // re-execute the query
+            rs = execute(query, Query.XPATH);
             it = rs.getNodes();
             try {
                 it.skip(count + 1);



Mime
View raw message