pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1778172 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Tue, 10 Jan 2017 18:29:17 GMT
Author: lehmi
Date: Tue Jan 10 18:29:17 2017
New Revision: 1778172

URL: http://svn.apache.org/viewvc?rev=1778172&view=rev
Log:
PDFBOX-3648: move seek operation to avoid IOException as proposed by Jesse Long

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1778172&r1=1778171&r2=1778172&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Tue Jan 10
18:29:17 2017
@@ -1371,10 +1371,10 @@ public class COSParser extends BaseParse
         long objectNr = objectKey.getNumber();
         int objectGen = objectKey.getGeneration();
         long originOffset = source.getPosition();
-        source.seek(offset);
         String objectString = createObjectString(objectNr, objectGen);
         try 
         {
+            source.seek(offset);
             if (isString(objectString.getBytes(ISO_8859_1)))
             {
                 // everything is ok, return origin object key



Mime
View raw message