pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1717074 - in /pdfbox/trunk/xmpbox: pom.xml src/test/java/org/apache/xmpbox/schema/BasicJobTicketSchemaTest.java
Date Sun, 29 Nov 2015 15:21:18 GMT
Author: lehmi
Date: Sun Nov 29 15:21:18 2015
New Revision: 1717074

URL: http://svn.apache.org/viewvc?rev=1717074&view=rev
Log:
PDFBOX-3137: remove the dependency on commons.io from xmpbox

Modified:
    pdfbox/trunk/xmpbox/pom.xml
    pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/BasicJobTicketSchemaTest.java

Modified: pdfbox/trunk/xmpbox/pom.xml
URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/pom.xml?rev=1717074&r1=1717073&r2=1717074&view=diff
==============================================================================
--- pdfbox/trunk/xmpbox/pom.xml (original)
+++ pdfbox/trunk/xmpbox/pom.xml Sun Nov 29 15:21:18 2015
@@ -37,11 +37,6 @@
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>commons-io</groupId>
-			<artifactId>commons-io</artifactId>
-			<scope>test</scope>
-		</dependency>
         <dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>

Modified: pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/BasicJobTicketSchemaTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/BasicJobTicketSchemaTest.java?rev=1717074&r1=1717073&r2=1717074&view=diff
==============================================================================
--- pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/BasicJobTicketSchemaTest.java
(original)
+++ pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/BasicJobTicketSchemaTest.java
Sun Nov 29 15:21:18 2015
@@ -23,7 +23,7 @@ package org.apache.xmpbox.schema;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
-import org.apache.commons.io.IOUtils;
+
 import org.apache.xmpbox.XMPMetadata;
 import org.apache.xmpbox.type.JobType;
 import org.apache.xmpbox.type.StructuredType;
@@ -56,13 +56,6 @@ public class BasicJobTicketSchemaTest
         serializer = new XmpSerializer();
     }
 
-    private InputStream transfer(ByteArrayOutputStream out)
-    {
-        IOUtils.closeQuietly(out);
-        ByteArrayInputStream bis = new ByteArrayInputStream(out.toByteArray());
-        return bis;
-    }
-
     @Test
     public void testAddTwoJobs() throws Exception
     {
@@ -76,7 +69,7 @@ public class BasicJobTicketSchemaTest
 
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         serializer.serialize(metadata, bos, true);
-        InputStream is = transfer(bos);
+        InputStream is = new ByteArrayInputStream(bos.toByteArray());
         XMPMetadata rxmp = builder.parse(is);
 
         XMPBasicJobTicketSchema jt = rxmp.getBasicJobTicketSchema();
@@ -98,7 +91,7 @@ public class BasicJobTicketSchemaTest
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
 
         serializer.serialize(metadata, bos, true);
-        InputStream is = transfer(bos);
+        InputStream is = new ByteArrayInputStream(bos.toByteArray());
         XMPMetadata rxmp = builder.parse(is);
 
         XMPBasicJobTicketSchema jt = rxmp.getBasicJobTicketSchema();
@@ -130,7 +123,7 @@ public class BasicJobTicketSchemaTest
 
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         serializer.serialize(metadata, bos, true);
-        InputStream is = transfer(bos);
+        InputStream is = new ByteArrayInputStream(bos.toByteArray());
         XMPMetadata rxmp = builder.parse(is);
 
         XMPBasicJobTicketSchema jt = rxmp.getBasicJobTicketSchema();



Mime
View raw message