pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1601452 - in /pdfbox/branches/1.8: ./ fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java
Date Mon, 09 Jun 2014 17:47:58 GMT
Author: lehmi
Date: Mon Jun  9 17:47:57 2014
New Revision: 1601452

URL: http://svn.apache.org/r1601452
Log:
PDFBOX-2074: ignore mapformed mappings based on a proposal of Juraj Lonc

Modified:
    pdfbox/branches/1.8/   (props changed)
    pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java

Propchange: pdfbox/branches/1.8/
------------------------------------------------------------------------------
  Merged /pdfbox/trunk:r1601451

Modified: pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java?rev=1601452&r1=1601451&r2=1601452&view=diff
==============================================================================
--- pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java (original)
+++ pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/cmap/CMap.java Mon Jun  9
17:47:57 2014
@@ -17,7 +17,6 @@
 package org.apache.fontbox.cmap;
 
 import java.io.IOException;
-
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedList;
@@ -25,14 +24,18 @@ import java.util.List;
 import java.util.Map;
 import java.util.Iterator;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * This class represents a CMap file.
  *
  * @author Ben Litchfield (ben@benlitchfield.com)
- * @version $Revision: 1.3 $
  */
 public class CMap
 {
+ 
+    private static final Log LOG = LogFactory.getLog(CMap.class);
     
     private int wmode = 0;
     private String cmapName = null;
@@ -234,7 +237,8 @@ public class CMap
         }
         else
         {
-            throw new IOException( "Mapping code should be 1 or two bytes and not " + src.length
);
+            // Just log the invalid entry instead of throwing an exception
+            LOG.error("Mapping code should be 1 or two bytes and not " + src.length);
         }
     }
 



Mime
View raw message