pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1808354 - /pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/type1/Type1Parser.java
Date Thu, 14 Sep 2017 15:05:10 GMT
Author: tilman
Date: Thu Sep 14 15:05:09 2017
New Revision: 1808354

URL: http://svn.apache.org/viewvc?rev=1808354&view=rev
Log:
PDFBOX-2852: use foreach

Modified:
    pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/type1/Type1Parser.java

Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/type1/Type1Parser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/type1/Type1Parser.java?rev=1808354&r1=1808353&r2=1808354&view=diff
==============================================================================
--- pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/type1/Type1Parser.java (original)
+++ pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/type1/Type1Parser.java Thu
Sep 14 15:05:09 2017
@@ -884,9 +884,9 @@ final class Type1Parser
     {
         // calculate needed length
         int len = 0;
-        for (int i = 0; i < bytes.length; ++i)
+        for (byte by : bytes)
         {
-            if (Character.digit((char) bytes[i], 16) != -1)
+            if (Character.digit((char) by, 16) != -1)
             {
                 ++len;
             }
@@ -894,9 +894,9 @@ final class Type1Parser
         byte[] res = new byte[len / 2];
         int r = 0;
         int prev = -1;
-        for (int i = 0; i < bytes.length; ++i)
+        for (byte by : bytes)
         {
-            int digit = Character.digit((char) bytes[i], 16);
+            int digit = Character.digit((char) by, 16);
             if (digit != -1)
             {
                 if (prev == -1)



Mime
View raw message