From e35347157de67687924267a7fd012a54ae4e9080 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 30 Dec 2021 20:41:51 +0000 Subject: [PATCH] try to fix test issue git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896542 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/stress/HPSFFileHandler.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java index 9809a7a11f..32c25a78d7 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java @@ -129,11 +129,12 @@ public class HPSFFileHandler extends POIFSFileHandler { assumeFalse(EXCLUDES_HANDLE_ADD.contains(file.getParentFile().getName()+"/"+file.getName())); try (UnsynchronizedByteArrayOutputStream bos = new UnsynchronizedByteArrayOutputStream()) { - PrintStream psNew = new PrintStream(bos, true, "ISO-8859-1"); - CopyCompare copyCompare = new CopyCompare(); - copyCompare.setOut(psNew); - CopyCompare.main(new String[]{file.getAbsolutePath(), copyOutput.get().getAbsolutePath()}); - assertEquals("Equal" + NL, bos.toString(StandardCharsets.UTF_8)); + try (PrintStream psNew = new PrintStream(bos, true, "ISO-8859-1")) { + CopyCompare copyCompare = new CopyCompare(); + copyCompare.setOut(psNew); + copyCompare.run(new String[]{file.getAbsolutePath(), copyOutput.get().getAbsolutePath()}); + assertEquals("Equal" + NL, bos.toString(StandardCharsets.UTF_8)); + } } }