https://bz.apache.org/bugzilla/show_bug.cgi?id=58245

Javen ONeal <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33001|0                           |1
        is obsolete|                            |

--- Comment #5 from Javen ONeal <[email protected]> ---
Created attachment 33066
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33066&action=edit
patch to make all workbooks implement Iterable<Sheet>

The XSSFWorkbook.iterator breaks that pattern used by Sheet.iterator and
Row.iterator

Unfortunately, XSSFWorkbook has had this method for nearly 7 years (r700472
https://svn.apache.org/viewvc?view=revision&revision=700472).
Nonetheless, I think deprecating the old iterator is a step in the right
direction, allowing developers to write for loops like

for (Sheet sh : workbook) {
    for (Row row : sh) {
        for (Cell cell : row) {
            System.out.println(cell);
        }
    }
}

I've provided test cases and documentation to help users transition their code
to the new Iterator<Sheet> iterator() interface (previously Iterator<XSSFSheet>
iterator().

Note: this patch will break backwards compatibility with existing code.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to