Adjust to make forbidden-api-check succeed again

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808930 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2017-09-19 19:02:31 +00:00
parent 46fd75b1e7
commit ecf7d0f277
4 changed files with 12 additions and 31 deletions

View File

@ -20,10 +20,7 @@
==================================================================== */
package org.apache.poi.dev;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.*;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.opc.OPCPackage;
@ -38,14 +35,14 @@ public class TestOOXMLLister {
private static PrintStream SYSTEM_OUT;
@BeforeClass
public static void setUp() {
public static void setUp() throws UnsupportedEncodingException {
SYSTEM_OUT = System.out;
System.setOut(new PrintStream(new OutputStream() {
@Override
public void write(int b) throws IOException {
}
}));
}, false, "UTF-8"));
}
@AfterClass

View File

@ -26,10 +26,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@ -39,14 +36,14 @@ public class TestOOXMLPrettyPrint {
private static PrintStream SYSTEM_OUT;
@BeforeClass
public static void setUp() {
public static void setUp() throws UnsupportedEncodingException {
SYSTEM_OUT = System.out;
System.setOut(new PrintStream(new OutputStream() {
@Override
public void write(int b) throws IOException {
}
}));
}, false, "UTF-8"));
}
@AfterClass

View File

@ -28,13 +28,7 @@ import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.*;
import static org.junit.Assert.*;
@ -42,15 +36,14 @@ public class TestPOIFSDump {
private static PrintStream SYSTEM;
@BeforeClass
public static void setUp() {
public static void setUp() throws UnsupportedEncodingException {
SYSTEM = System.out;
System.setOut(new PrintStream(new OutputStream() {
@Override
public void write(int b) throws IOException {
}
}
));
}, false, "UTF-8"));
}
@AfterClass

View File

@ -22,13 +22,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.*;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@ -39,14 +33,14 @@ public class TestHexDump {
private static PrintStream SYSTEM_OUT;
@BeforeClass
public static void setUp() {
public static void setUp() throws UnsupportedEncodingException {
SYSTEM_OUT = System.out;
System.setOut(new PrintStream(new OutputStream() {
@Override
public void write(int b) throws IOException {
}
}));
}, false, "UTF-8"));
}
@AfterClass