pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1763795 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
Date Fri, 07 Oct 2016 16:21:15 GMT
Author: tilman
Date: Fri Oct  7 16:21:15 2016
New Revision: 1763795

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

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

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java?rev=1763795&r1=1763794&r2=1763795&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
Fri Oct  7 16:21:15 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);
     }
 
     /**



Mime
View raw message