]> source.dussan.org Git - poi.git/commitdiff
fix use of forbidden api
authorPJ Fanning <fanningpj@apache.org>
Mon, 22 Apr 2024 10:43:36 +0000 (10:43 +0000)
committerPJ Fanning <fanningpj@apache.org>
Mon, 22 Apr 2024 10:43:36 +0000 (10:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917264 13f79535-47bb-0310-9956-ffa450edef68

poi-examples/src/test/java/org/apache/poi/examples/hssf/eventusermodel/TestXLS2CSVmra.java

index f6cbbc4d671ac5049c9af2d66d5d96cc66de90f6..c5d9edbf54bea59323c374a012a7926f8de31a1b 100644 (file)
@@ -44,7 +44,7 @@ class TestXLS2CSVmra {
     @Test
     void testProcess() throws IOException {
         ByteArrayOutputStream outStream = new ByteArrayOutputStream();
-        PrintStream out = new PrintStream(outStream);
+        PrintStream out = new PrintStream(outStream, false, StandardCharsets.UTF_8.name());
         XLS2CSVmra cvs = new XLS2CSVmra(
                 new POIFSFileSystem(new FileInputStream(HSSFTestDataSamples.getSampleFile("SampleSS.xls").getAbsolutePath())),
                 out, -1);
@@ -75,7 +75,7 @@ class TestXLS2CSVmra {
     @Test
     void testProcessNumberRecord() throws IOException {
         ByteArrayOutputStream outStream = new ByteArrayOutputStream();
-        PrintStream out = new PrintStream(outStream);
+        PrintStream out = new PrintStream(outStream, false, StandardCharsets.UTF_8.name());
         XLS2CSVmra cvs = new XLS2CSVmra(
                 new POIFSFileSystem(new FileInputStream(HSSFTestDataSamples.getSampleFile("empty.xls").getAbsolutePath())),
                 out, -1);