Skip to content

Commit eebce4d

Browse files
committed
PDFBOX-5957: optimize
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923835 13f79535-47bb-0310-9956-ffa450edef68
1 parent 58dd79c commit eebce4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ else if (startOpIdx != -1 && endOpIdx == -1 &&
361361
}
362362

363363
// PDFBOX-3742: just assuming that 1-3 non blanks is a PDF operator isn't enough
364-
if (endOpIdx != -1 && startOpIdx != -1)
364+
if (noBinData && endOpIdx != -1 && startOpIdx != -1)
365365
{
366366
// usually, the operator here is Q, sometimes EMC (PDFBOX-2376), S (PDFBOX-3784)
367367
s = new String(binCharTestArr, startOpIdx, endOpIdx - startOpIdx);
@@ -373,7 +373,7 @@ else if (startOpIdx != -1 && endOpIdx == -1 &&
373373
}
374374

375375
// only if not close to EOF
376-
if (startOpIdx != -1 && readBytes == MAX_BIN_CHAR_TEST_LENGTH)
376+
if (noBinData && startOpIdx != -1 && readBytes == MAX_BIN_CHAR_TEST_LENGTH)
377377
{
378378
if (endOpIdx == -1)
379379
{

0 commit comments

Comments
 (0)