sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1723744 - /sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/provisioning/EmbeddedModelTest.java
Date Fri, 08 Jan 2016 15:40:14 GMT
Author: bdelacretaz
Date: Fri Jan  8 15:40:14 2016
New Revision: 1723744

URL: http://svn.apache.org/viewvc?rev=1723744&view=rev
Log:
SLING-5414 - simplify test

Modified:
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/provisioning/EmbeddedModelTest.java

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/provisioning/EmbeddedModelTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/provisioning/EmbeddedModelTest.java?rev=1723744&r1=1723743&r2=1723744&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/provisioning/EmbeddedModelTest.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/provisioning/EmbeddedModelTest.java
Fri Jan  8 15:40:14 2016
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.io.InputStream;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.sling.junit.rules.TeleporterRule;
 import org.apache.sling.launchpad.api.LaunchpadContentProvider;
 import org.junit.Before;
@@ -45,12 +44,9 @@ public class EmbeddedModelTest {
     public void setup() throws IOException {
         final InputStream modelStream = teleporter.getService(LaunchpadContentProvider.class).getResourceAsStream(MODEL_RESOURCE_PATH);
         assertNotNull("Expecting embedded model resource at " + MODEL_RESOURCE_PATH, modelStream);
-        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
         try {
-            IOUtils.copy(modelStream, bos);
-            modelContent = new String(bos.toByteArray());
+            modelContent = new String(IOUtils.toByteArray(modelStream));
         } finally {
-            bos.close();
             modelStream.close();
         }
     }



Mime
View raw message