From 27b4bdc3f7834983e017ce765bd3a753b0462dfc Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Mon, 15 Nov 2021 00:03:44 +0000 Subject: Move org.apache.poi.hssf.dev classes from poi:main to poi:test Use CloseShieldOutputStream instead of CloseIgnoringInputStream git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895041 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/poi/stress/HSSFFileHandler.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'poi-integration/src/test/java') diff --git a/poi-integration/src/test/java/org/apache/poi/stress/HSSFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/HSSFFileHandler.java index 62e0d7cbc3..b009d2ea0b 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/HSSFFileHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/HSSFFileHandler.java @@ -33,7 +33,6 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; -import org.apache.commons.io.output.NullPrintStream; import org.junit.jupiter.api.Test; public class HSSFFileHandler extends SpreadsheetHandler { @@ -88,10 +87,8 @@ public class HSSFFileHandler extends SpreadsheetHandler { PrintStream oldOut = System.out; String fileWithParent = file.getParentFile().getName() + "/" + file.getName(); try { - System.setOut(new NullPrintStream()); - - BiffViewer.main(new String[]{file.getAbsolutePath()}); - + BiffViewer bv = new BiffViewer(); + bv.parse(file, null); assertFalse( EXPECTED_ADDITIONAL_FAILURES.contains(fileWithParent), "Expected Extraction to fail for file " + file + " and handler " + this + ", but did not fail!" ); } catch (OldExcelFormatException e) { // old excel formats are not supported here -- cgit v1.2.3