From: Andreas Beeker Date: Tue, 5 May 2015 23:51:10 +0000 (+0000) Subject: OOM fix for gump run X-Git-Tag: REL_3_12_FINAL~2^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=36156dc87baa26abf78e5f1cef067602b20615f4;p=poi.git OOM fix for gump run git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1677913 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index 4fc0db1576..365ed2270c 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -2463,7 +2463,17 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { c.setCellValue(i); } - wb = XSSFTestDataSamples.writeOutAndReadBack(wb); + // using temp file instead of ByteArrayOutputStream because of OOM in gump run + File tmp = TempFile.createTempFile("poi-test", ".bug57880"); + FileOutputStream fos = new FileOutputStream(tmp); + wb.write(fos); + fos.close(); + + wb.close(); + fmt = null; s = null; wb = null; + // System.gc(); + + wb = new XSSFWorkbook(tmp); fmt = wb.getCreationHelper().createDataFormat(); s = wb.getSheetAt(0); for (int i=1; i