summaryrefslogtreecommitdiffstats
path: root/poi-integration
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2021-12-30 20:41:51 +0000
committerPJ Fanning <fanningpj@apache.org>2021-12-30 20:41:51 +0000
commite35347157de67687924267a7fd012a54ae4e9080 (patch)
tree264582c97757bb40cda82163beee7e600d397e35 /poi-integration
parent9de29ea3fcc63dc434d3337e56fb504e71262fb5 (diff)
downloadpoi-e35347157de67687924267a7fd012a54ae4e9080.tar.gz
poi-e35347157de67687924267a7fd012a54ae4e9080.zip
try to fix test issue
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896542 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration')
-rw-r--r--poi-integration/src/test/java/org/apache/poi/stress/HPSFFileHandler.java11
1 files 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));
+ }
}
}