aboutsummaryrefslogtreecommitdiffstats
path: root/poi-examples/src/test/java/org
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2021-05-21 22:32:09 +0000
committerAndreas Beeker <kiwiwings@apache.org>2021-05-21 22:32:09 +0000
commitf21019db12ad2234d5681f49a0c5a40064fc2418 (patch)
treef3a00622b503797787d392260bc3f97a44b844ae /poi-examples/src/test/java/org
parent7eaca60a1a364ce6e232363d27823e971a992705 (diff)
downloadpoi-f21019db12ad2234d5681f49a0c5a40064fc2418.tar.gz
poi-f21019db12ad2234d5681f49a0c5a40064fc2418.zip
add forbidden-apis plugin to gradle builds
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1890090 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples/src/test/java/org')
-rw-r--r--poi-examples/src/test/java/org/apache/poi/integration/TestXLSX2CSV.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/poi-examples/src/test/java/org/apache/poi/integration/TestXLSX2CSV.java b/poi-examples/src/test/java/org/apache/poi/integration/TestXLSX2CSV.java
index f21f512284..139b9115d3 100644
--- a/poi-examples/src/test/java/org/apache/poi/integration/TestXLSX2CSV.java
+++ b/poi-examples/src/test/java/org/apache/poi/integration/TestXLSX2CSV.java
@@ -21,6 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
@@ -37,11 +38,11 @@ public class TestXLSX2CSV {
private final UnsynchronizedByteArrayOutputStream errorBytes = new UnsynchronizedByteArrayOutputStream();
@BeforeEach
- public void setUp() {
+ public void setUp() throws UnsupportedEncodingException {
// remember and replace default error streams
err = System.err;
- PrintStream error = new PrintStream(errorBytes);
+ PrintStream error = new PrintStream(errorBytes, true, "UTF-8");
System.setErr(error);
}
@@ -77,7 +78,7 @@ public class TestXLSX2CSV {
@Test
public void testSampleFile() throws Exception {
final UnsynchronizedByteArrayOutputStream outputBytes = new UnsynchronizedByteArrayOutputStream();
- PrintStream out = new PrintStream(outputBytes);
+ PrintStream out = new PrintStream(outputBytes, true, "UTF-8");
// The package open is instantaneous, as it should be.
try (OPCPackage p = OPCPackage.open(XSSFTestDataSamples.getSampleFile("sample.xlsx").getAbsolutePath(), PackageAccess.READ)) {
@@ -96,7 +97,7 @@ public class TestXLSX2CSV {
@Test
public void testMinColumns() throws Exception {
final UnsynchronizedByteArrayOutputStream outputBytes = new UnsynchronizedByteArrayOutputStream();
- PrintStream out = new PrintStream(outputBytes);
+ PrintStream out = new PrintStream(outputBytes, true, "UTF-8");
// The package open is instantaneous, as it should be.
try (OPCPackage p = OPCPackage.open(XSSFTestDataSamples.getSampleFile("sample.xlsx").getAbsolutePath(), PackageAccess.READ)) {