pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1646585 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Date Thu, 18 Dec 2014 23:49:22 GMT
Author: tilman
Date: Thu Dec 18 23:49:21 2014
New Revision: 1646585

URL: http://svn.apache.org/r1646585
Log:
PDFBOX-2576: inner assignments should be avoided

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java?rev=1646585&r1=1646584&r2=1646585&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Thu Dec 18 23:49:21 2014
@@ -925,7 +925,8 @@ public class NonSequentialPDFParser exte
             else if (patOff < lastPatternChOff)
             {
                 // no char match but already matched some chars; reset
-                lookupCh = pattern[patOff = lastPatternChOff];
+                patOff = lastPatternChOff;
+                lookupCh = pattern[patOff];
             }
         }
 
@@ -1384,8 +1385,8 @@ public class NonSequentialPDFParser exte
                                 List<COSObject> stmObjects = objToBeParsed.get(fileOffset);
                                 if (stmObjects == null)
                                 {
-                                    objToBeParsed.put(fileOffset,
-                                            stmObjects = new ArrayList<COSObject>());
+                                    stmObjects = new ArrayList<COSObject>();
+                                    objToBeParsed.put(fileOffset, stmObjects);
                                 }
                                 stmObjects.add(obj);
                             }



Mime
View raw message