aboutsummaryrefslogtreecommitdiffstats
path: root/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2023-06-08 08:53:08 +0000
committerDominik Stadler <centic@apache.org>2023-06-08 08:53:08 +0000
commitd3e35e740a593027a1105e6509c0aadaa54399b0 (patch)
tree4f9c5b276aa7a088def6aaa7282bb37c39b16105 /poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java
parentc8f9fe4c2c01aa896c80de7b43725788b4ce6c4a (diff)
downloadpoi-d3e35e740a593027a1105e6509c0aadaa54399b0.tar.gz
poi-d3e35e740a593027a1105e6509c0aadaa54399b0.zip
Remove deprecation warnings reported with newer commons-io
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1910300 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java')
-rw-r--r--poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java
index 314d5ed985..160d7059a2 100644
--- a/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java
+++ b/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java
@@ -16,7 +16,6 @@
==================================================================== */
package org.apache.poi.stress;
-import static org.apache.commons.io.output.NullOutputStream.NULL_OUTPUT_STREAM;
import static org.apache.poi.xssf.XSSFTestDataSamples.getSampleFile;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -36,6 +35,7 @@ import java.util.Set;
import javax.xml.transform.TransformerException;
+import org.apache.commons.io.output.NullOutputStream;
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
import org.apache.poi.EncryptedDocumentException;
import org.apache.poi.examples.ss.ExcelComparator;
@@ -72,7 +72,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
// make sure the potentially large byte-array is freed up quickly again
{
- UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream();
+ UnsynchronizedByteArrayOutputStream out = UnsynchronizedByteArrayOutputStream.builder().get();
IOUtils.copy(stream, out);
if (pass != null) {
@@ -156,7 +156,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
TransformerException {
for (XSSFMap map : wb.getCustomXMLMappings()) {
XSSFExportToXml exporter = new XSSFExportToXml(map);
- exporter.exportToXML(NULL_OUTPUT_STREAM, true);
+ exporter.exportToXML(NullOutputStream.INSTANCE, true);
}
}