You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/09/21 08:28:08 UTC

[Bug 58432] Sheet and Row iterators expose remove method which does not correctly remove the row or cell

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

--- Comment #1 from Javen ONeal <ja...@gmail.com> ---
Created attachment 33121
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33121&action=edit
failing unit tests

I've written unit tests for Workbook, Sheet, and Row which should test the
sheetIterator, rowIterator, and cellIterator, respectively for the following
scenarios:
1) iterator.remove() either is unsupported or behaves the same as the
removeSheetAt, removeRow, or removeCell method
2) if removeSheetAt, removeRow, or removeCell are called after an iterator has
been created, the iterator should throw a ConcurrentModificationException the
next time a method is called on it.

The Workbook sheetIterator passes, but the rowIterator and cellIterator fail
for HSSF, XSSF, and SXSSF variants.

Summary of test results
                  HSSF   XSSF   SXSSF
BaseTestWorkbook  pass   pass   pass
BaseTestSheet     1fail  1fail  1fail
BaseTestRow       2fails 1fail  1fail

I needed to modify HSSFRow.hashCode in order to have assertNull(HSSFRow) give a
more meaningful error.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org