]> source.dussan.org Git - poi.git/commitdiff
Adjust test to pass forbidden-apis-check
authorDominik Stadler <centic@apache.org>
Sat, 30 Jan 2016 11:02:54 +0000 (11:02 +0000)
committerDominik Stadler <centic@apache.org>
Sat, 30 Jan 2016 11:02:54 +0000 (11:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1727693 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java

index 2e8f6d28b449dde6894a313f5fdb307971cae2f8..02a77e8d4ed806203e4a8f46846ac39e8a2e883e 100644 (file)
@@ -312,7 +312,7 @@ public final class TestOldExcelExtractor {
         try {
             ByteArrayOutputStream out = new ByteArrayOutputStream();
             try {
-                PrintStream str = new PrintStream(out);
+                PrintStream str = new PrintStream(out, false, "UTF-8");
                 System.setErr(str);
                 OldExcelExtractor.main(new String[] {});
             } finally {
@@ -330,13 +330,13 @@ public final class TestOldExcelExtractor {
         try {
             ByteArrayOutputStream out = new ByteArrayOutputStream();
             try {
-                PrintStream str = new PrintStream(out);
+                PrintStream str = new PrintStream(out, false, "UTF-8");
                 System.setOut(str);
                 OldExcelExtractor.main(new String[] {file.getAbsolutePath()});
             } finally {
                 out.close();
             }
-            String string = new String(out.toByteArray());
+            String string = new String(out.toByteArray(), "UTF-8");
             assertTrue("Had: " + string, 
                     string.contains("Table C-13--Lemons"));
         } finally {