pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1789010 - /pdfbox/trunk/xmpbox/src/test/java/org/apache/xmpbox/schema/BasicJobTicketSchemaTest.java
Date Mon, 27 Mar 2017 20:52:56 GMT
Author: tilman
Date: Mon Mar 27 20:52:56 2017
New Revision: 1789010

URL: http://svn.apache.org/viewvc?rev=1789010&view=rev
Log:
PDFBOX-2852: simplify and optimize code

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

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=1789010&r1=1789009&r2=1789010&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
Mon Mar 27 20:52:56 2017
@@ -20,9 +20,7 @@
 
 package org.apache.xmpbox.schema;
 
-import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
 
 import org.apache.xmpbox.XMPMetadata;
 import org.apache.xmpbox.type.JobType;
@@ -69,8 +67,7 @@ public class BasicJobTicketSchemaTest
 
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         serializer.serialize(metadata, bos, true);
-        InputStream is = new ByteArrayInputStream(bos.toByteArray());
-        XMPMetadata rxmp = builder.parse(is);
+        XMPMetadata rxmp = builder.parse(bos.toByteArray());
 
         XMPBasicJobTicketSchema jt = rxmp.getBasicJobTicketSchema();
         Assert.assertNotNull(jt);
@@ -91,8 +88,7 @@ public class BasicJobTicketSchemaTest
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
 
         serializer.serialize(metadata, bos, true);
-        InputStream is = new ByteArrayInputStream(bos.toByteArray());
-        XMPMetadata rxmp = builder.parse(is);
+        XMPMetadata rxmp = builder.parse(bos.toByteArray());
 
         XMPBasicJobTicketSchema jt = rxmp.getBasicJobTicketSchema();
         Assert.assertNotNull(jt);
@@ -123,8 +119,7 @@ public class BasicJobTicketSchemaTest
 
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         serializer.serialize(metadata, bos, true);
-        InputStream is = new ByteArrayInputStream(bos.toByteArray());
-        XMPMetadata rxmp = builder.parse(is);
+        XMPMetadata rxmp = builder.parse(bos.toByteArray());
 
         XMPBasicJobTicketSchema jt = rxmp.getBasicJobTicketSchema();
         Assert.assertNotNull(jt);



Mime
View raw message