pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1822076 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Wed, 24 Jan 2018 06:55:03 GMT
Author: lehmi
Date: Wed Jan 24 06:55:03 2018
New Revision: 1822076

URL: http://svn.apache.org/viewvc?rev=1822076&view=rev
Log:
PDFBOX-4052: allow all whitespace when searching for objects

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

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1822076&r1=1822075&r2=1822076&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Wed
Jan 24 06:55:03 2018
@@ -1498,7 +1498,7 @@ public class COSParser extends BaseParse
                 source.seek(currentOffset);
                 int nextChar = source.read();
                 currentOffset++;
-                if (nextChar == ' ' && isString(OBJ_MARKER))
+                if (isWhitespace(nextChar) && isString(OBJ_MARKER))
                 {
                     long tempOffset = currentOffset - 2;
                     source.seek(tempOffset);
@@ -1509,9 +1509,9 @@ public class COSParser extends BaseParse
                         genID -= 48;
                         tempOffset--;
                         source.seek(tempOffset);
-                        if (isSpace())
+                        if (isWhitespace())
                         {
-                            while (tempOffset > MINIMUM_SEARCH_OFFSET && isSpace())
+                            while (tempOffset > MINIMUM_SEARCH_OFFSET && isWhitespace())
                             {
                                 source.seek(--tempOffset);
                             }



Mime
View raw message