From a28596d58332b683c2e2b4d9b8de95cc72e40c11 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 14 May 2021 02:09:44 +0000 Subject: [PATCH] forbidden api issue git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889872 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/extractor/TestOldExcelExtractor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java b/poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java index c9438fd990..4f541ee468 100644 --- a/poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java +++ b/poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java @@ -41,6 +41,7 @@ import org.apache.poi.hssf.HSSFTestDataSamples; import org.apache.poi.poifs.filesystem.OfficeXmlFileException; import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.apache.commons.io.output.NullPrintStream; +import org.apache.poi.util.LocaleUtil; import org.apache.poi.util.RecordFormatException; import org.junit.jupiter.api.Test; @@ -323,7 +324,7 @@ final class TestOldExcelExtractor { File file = HSSFTestDataSamples.getSampleFile("testEXCEL_3.xls"); PrintStream save = System.out; try (UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); - PrintStream str = new PrintStream(out, false, StandardCharsets.UTF_8.displayName())) { + PrintStream str = new PrintStream(out, false, StandardCharsets.UTF_8.displayName(LocaleUtil.getUserLocale()))) { System.setOut(str); OldExcelExtractor.main(new String[] {file.getAbsolutePath()}); String string = out.toString(StandardCharsets.UTF_8); -- 2.39.5