diff options
author | Dominik Stadler <centic@apache.org> | 2023-06-08 08:53:08 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2023-06-08 08:53:08 +0000 |
commit | d3e35e740a593027a1105e6509c0aadaa54399b0 (patch) | |
tree | 4f9c5b276aa7a088def6aaa7282bb37c39b16105 /osgi | |
parent | c8f9fe4c2c01aa896c80de7b43725788b4ce6c4a (diff) | |
download | poi-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 'osgi')
3 files changed, 4 insertions, 4 deletions
diff --git a/osgi/src/test/java/org/apache/poi/osgi/OSGiExtractorsIT.java b/osgi/src/test/java/org/apache/poi/osgi/OSGiExtractorsIT.java index 3bf58a2b61..0196bfb6f0 100755 --- a/osgi/src/test/java/org/apache/poi/osgi/OSGiExtractorsIT.java +++ b/osgi/src/test/java/org/apache/poi/osgi/OSGiExtractorsIT.java @@ -57,7 +57,7 @@ public class OSGiExtractorsIT extends BaseOSGiTestCase { box.setText("Hello, World!"); box.setAnchor(new Rectangle(36, 15, 648, 65)); - UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out = UnsynchronizedByteArrayOutputStream.builder().get(); ppt.write(out); return out.toByteArray(); } @@ -66,7 +66,7 @@ public class OSGiExtractorsIT extends BaseOSGiTestCase { Sheet s = wb.createSheet("OSGi"); s.createRow(0).createCell(0).setCellValue("Hello, World!"); - UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream(); + UnsynchronizedByteArrayOutputStream out = UnsynchronizedByteArrayOutputStream.builder().get(); wb.write(out); return out.toByteArray(); diff --git a/osgi/src/test/java/org/apache/poi/osgi/OSGiSlideShowIT.java b/osgi/src/test/java/org/apache/poi/osgi/OSGiSlideShowIT.java index 9744c36ca9..3e4ebdf96e 100755 --- a/osgi/src/test/java/org/apache/poi/osgi/OSGiSlideShowIT.java +++ b/osgi/src/test/java/org/apache/poi/osgi/OSGiSlideShowIT.java @@ -75,7 +75,7 @@ public class OSGiSlideShowIT extends BaseOSGiTestCase { } box2.setAnchor(new Rectangle(36, 80, 648, 400)); - try (UnsynchronizedByteArrayOutputStream baos = new UnsynchronizedByteArrayOutputStream()) { + try (UnsynchronizedByteArrayOutputStream baos = UnsynchronizedByteArrayOutputStream.builder().get()) { ppt.write(baos); try (InputStream bais = baos.toInputStream()) { ppt = SlideShowFactory.create(bais); diff --git a/osgi/src/test/java/org/apache/poi/osgi/OSGiSpreadsheetIT.java b/osgi/src/test/java/org/apache/poi/osgi/OSGiSpreadsheetIT.java index 618b76e36c..7793754bca 100644 --- a/osgi/src/test/java/org/apache/poi/osgi/OSGiSpreadsheetIT.java +++ b/osgi/src/test/java/org/apache/poi/osgi/OSGiSpreadsheetIT.java @@ -48,7 +48,7 @@ public class OSGiSpreadsheetIT extends BaseOSGiTestCase { s.createRow(0).createCell(0).setCellValue("With OSGi"); s.createRow(1).createCell(0).setCellFormula("SUM(A1:B3)"); - try (UnsynchronizedByteArrayOutputStream baos = new UnsynchronizedByteArrayOutputStream()) { + try (UnsynchronizedByteArrayOutputStream baos = UnsynchronizedByteArrayOutputStream.builder().get()) { wb.write(baos); try (InputStream bais = baos.toInputStream()) { wb = WorkbookFactory.create(bais); |