Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1335

bad assumptions on QueryResult.getIterator() semantics in QueryResultNodeIteratorTest.testSkip()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0, 1.0.1, 1.1, 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.3, 1.3.1, 1.3.3, 1.4
    • 1.5
    • jackrabbit-jcr-tests
    • None

    Description

      testSkip() assumes that calling getIterator() a second time will return a new iterator of the same size. JSR-170 is silent on this. Forcing a server to implement this essantially means that the query result must be cached until there's no reference to QueryResult anymore.

      As this is a test of skip(), not getIterator(), the test should really refetch a new QueryResult in order to obtain a new iterator.

      (Note: The issue of the semantics of QueryResult.getIterator should be discussed by the JCR EG.)

      Attachments

        1. JCR-1335.patch.txt
          1 kB
          Julian Reschke

        Activity

          People

            reschke Julian Reschke
            reschke Julian Reschke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: