You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2017/06/20 06:08:39 UTC
svn commit: r1799304 -
/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java
Author: onealj
Date: Tue Jun 20 06:08:38 2017
New Revision: 1799304
URL: http://svn.apache.org/viewvc?rev=1799304&view=rev
Log:
bug 56557: open test-data/spreadsheet/56557.xlsx such that the unit test test56557() does not leave a modified file on disk after running.
I verified that
> Workbook wb = XSSFTestDataSamples.openSampleWorkbook("56557.xlsx")
and
> Workbook wb = WorkbookFactory.create(XSSFTestDataSamples.getSampleFile("56557.xlsx"), password=null, readOnly=false);
both fail when the fix from r1798913 for SXSSFWorkbook is not applied and both pass when the fix is applied.
Modified:
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java
Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java?rev=1799304&r1=1799303&r2=1799304&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java Tue Jun 20 06:08:38 2017
@@ -580,22 +580,16 @@ public final class TestSXSSFWorkbook ext
@Test
public void test56557() throws IOException, InvalidFormatException {
- Workbook wb = WorkbookFactory.create(XSSFTestDataSamples.getSampleFile("56557.xlsx"), null, false);
+ Workbook wb = XSSFTestDataSamples.openSampleWorkbook("56557.xlsx");
// Using streaming XSSFWorkbook makes the output file invalid
wb = new SXSSFWorkbook(((XSSFWorkbook) wb));
+ // Should not throw POIXMLException: java.io.IOException: Unable to parse xml bean when reading back
Workbook wbBack = XSSFTestDataSamples.writeOutAndReadBack(wb);
assertNotNull(wbBack);
wbBack.close();
- /*FileOutputStream out = new FileOutputStream("C:/temp/out.xlsx");
- try {
- wb.write(out);
- } finally {
- out.close();
- }*/
-
wb.close();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org