mirror of https://github.com/apache/poi.git
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
b3d1bef3a1
commit
797048ff1e
|
@ -64,7 +64,10 @@ public final class SXSSFITestDataProvider implements ITestDataProvider {
|
|||
*/
|
||||
@Override
|
||||
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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue