You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (Jira)" <de...@uima.apache.org> on 2021/01/20 11:03:00 UTC

[jira] [Updated] (UIMA-6297) SelectFS with limit in combination with fsIterator has issues

     [ https://issues.apache.org/jira/browse/UIMA-6297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Eckart de Castilho updated UIMA-6297:
---------------------------------------------
    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:

{code}
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
{code}


  was:
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
```


> SelectFS with limit in combination with fsIterator has issues
> -------------------------------------------------------------
>
>                 Key: UIMA-6297
>                 URL: https://issues.apache.org/jira/browse/UIMA-6297
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>            Reporter: Richard Eckart de Castilho
>            Priority: Major
>
> 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:
> {code}
> 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
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)