You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2016/10/07 16:21:11 UTC

svn commit: r1763794 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java

Author: tilman
Date: Fri Oct  7 16:21:10 2016
New Revision: 1763794

URL: http://svn.apache.org/viewvc?rev=1763794&view=rev
Log:
PDFBOX-2852: don't reassign parameter, as suggested by scotty1024 in github PR 6

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java?rev=1763794&r1=1763793&r2=1763794&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java Fri Oct  7 16:21:10 2016
@@ -114,11 +114,8 @@ public final class InstructionSequenceBu
      */
     public static int parseInt(String token)
     {
-        if (token.startsWith("+"))
-        {
-            token = token.substring(1);
-        }
-        return Integer.parseInt(token);
+        //TODO Beginning with JDK7 Integer.parseInt accepts leading +'s
+        return Integer.parseInt(token.startsWith("+") ? token.substring(1) : token);
     }
 
     /**