pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1654378 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
Date Fri, 23 Jan 2015 20:45:33 GMT
Author: tilman
Date: Fri Jan 23 20:45:32 2015
New Revision: 1654378

URL: http://svn.apache.org/r1654378
Log:
PDFBOX-2576: merge if statements

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java?rev=1654378&r1=1654377&r2=1654378&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java Fri Jan
23 20:45:32 2015
@@ -712,18 +712,16 @@ public abstract class BaseParser impleme
         // means that there is an error in the pdf and assume that
         // was the end of the document.
         //
-        if (amountRead == 3)
-        {
-            if (( nextThreeBytes[0] == ASCII_CR        // Look for a carriage return
-                    && nextThreeBytes[1] == ASCII_LF   // Look for a new line
-                    && nextThreeBytes[2] == 0x2f ) // Look for a slash /
-                                                   // Add a second case without a new line
-                    || (nextThreeBytes[0] == ASCII_CR  // Look for a carriage return
-                            && nextThreeBytes[1] == 0x2f ))  // Look for a slash
/
+        if (amountRead == 3 &&
+               (( nextThreeBytes[0] == ASCII_CR  // Look for a carriage return
+               && nextThreeBytes[1] == ASCII_LF  // Look for a new line
+               && nextThreeBytes[2] == 0x2f ) // Look for a slash /
+                                              // Add a second case without a new line
+               || (nextThreeBytes[0] == ASCII_CR  // Look for a carriage return
+                && nextThreeBytes[1] == 0x2f )))  // Look for a slash /
             {
                 braces = 0;
             }
-        }
         if (amountRead > 0)
         {
             pdfSource.unread( nextThreeBytes, 0, amountRead );



Mime
View raw message