bug 60601: allow SXSSFITestDataProvider.writeOutAndReadBack(Workbook wb) to work on SXSSFWorkbooks and XSSFWorkbooks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1779433 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
45de2e444a
commit
b2e807c005
@ -64,7 +64,10 @@ public final class SXSSFITestDataProvider implements ITestDataProvider {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public XSSFWorkbook writeOutAndReadBack(Workbook wb) {
|
public XSSFWorkbook writeOutAndReadBack(Workbook wb) {
|
||||||
if(!(wb instanceof SXSSFWorkbook)) {
|
// wb is usually an SXSSFWorkbook, but must also work on an XSSFWorkbook
|
||||||
|
// since workbooks must be able to be written out and read back
|
||||||
|
// several times in succession
|
||||||
|
if(!(wb instanceof SXSSFWorkbook || wb instanceof XSSFWorkbook)) {
|
||||||
throw new IllegalArgumentException("Expected an instance of SXSSFWorkbook");
|
throw new IllegalArgumentException("Expected an instance of SXSSFWorkbook");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user