Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-6297

SelectFS with limit in combination with fsIterator has issues

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0SDK
    • Core Java Framework
    • None

    Description

      When doing a SelectFS.limit(x).fsIterator(), then an iterator is returned which can only call get() x times. Moving the iterator around (moveToNext, moveToPrev, etc.) is not really taken into account. This could be considered a bug e.g. in situations such as this:

      FSIterator i = cas.select().following(x).limit(2).fsIterator();
      i.get(); // first result
      i.moveToNext();
      i.get(); // second result
      i.moveToPrevious();
      i.get() // Expected: first result -- actual: NoSuchElementException
      

      Attachments

        Activity

          People

            rec Richard Eckart de Castilho
            rec Richard Eckart de Castilho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: