aboutsummaryrefslogtreecommitdiffstats
path: root/osgi
diff options
context:
space:
mode:
Diffstat (limited to 'osgi')
-rwxr-xr-xosgi/src/test/java/org/apache/poi/osgi/OSGiExtractorsIT.java4
-rwxr-xr-xosgi/src/test/java/org/apache/poi/osgi/OSGiSlideShowIT.java2
-rw-r--r--osgi/src/test/java/org/apache/poi/osgi/OSGiSpreadsheetIT.java2
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);