Adjust test to pass forbidden-apis-check

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1727693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2016-01-30 11:02:54 +00:00
parent 68997de5f0
commit a79dfd18e4

View File

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