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

Svante Schubert resolved ODFTOOLKIT-442.
----------------------------------------
    Resolution: Fixed

Pushed changes. Thanks for patch, Raimund!

> Table.getRowIterator() out of sync without calling hasNext()
> ------------------------------------------------------------
>
>                 Key: ODFTOOLKIT-442
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-442
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: simple api
>    Affects Versions: 0.6.2-incubating
>            Reporter: Raimund Hölle
>            Assignee: Svante Schubert
>            Priority: Minor
>         Attachments: ODFTOOLKIT-442_patch.txt, SpreadsheetIteratorTest.ods
>
>
> Calling next() of the iterator Table.getRowIterator() delivers the same row 
> repeatedly if no prior call of hasNext() occurs.
> Given a spreadsheet with these rows:
>   row0
>   row1
>   row2
> Then the code below delivers the following:
>   row0
>   row1
>   row1
> Iterator<Row> rowIter = table.getRowIterator();
> for (int n = 0; n < table.getRowCount(); n++) {
>   Row = rowIter.next();
>   ...
> }
> In some complex scenarios such usage of an iterator may occur (e. g., when 
> querying several iterators in parallel for comparing two sheets).
> SimpleRowIterator should work as any other iterators, hasNext() shouldn't 
> have any side effects.
> The appended patch contains a test class for the problem and a fix.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to