pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1690224 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java
Date Fri, 10 Jul 2015 08:30:35 GMT
Author: jahewson
Date: Fri Jul 10 08:30:35 2015
New Revision: 1690224

URL: http://svn.apache.org/r1690224
Log:
PDFBOX-2366: Speed up CMap lookup

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java?rev=1690224&r1=1690223&r2=1690224&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java Fri Jul 10 08:30:35
2015
@@ -188,9 +188,10 @@ public class CMap
      */
     public int toCID(int code)
     {
-        if (codeToCid.containsKey(code))
+        Integer cid = codeToCid.get(code);
+        if (cid != null)
         {
-            return codeToCid.get(code);
+            return cid;
         }
         for (CIDRange range : codeToCidRanges)
         {



Mime
View raw message