pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1604681 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel: common/PDMemoryStream.java font/PDFont.java
Date Mon, 23 Jun 2014 02:19:40 GMT
Author: jahewson
Date: Mon Jun 23 02:19:39 2014
New Revision: 1604681

URL: http://svn.apache.org/r1604681
Log:
PDFBOX-2149: Prevent NPE in system TTF getFontDescriptor()

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDMemoryStream.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDMemoryStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDMemoryStream.java?rev=1604681&r1=1604680&r2=1604681&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDMemoryStream.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDMemoryStream.java
Mon Jun 23 02:19:39 2014
@@ -91,7 +91,7 @@ public class PDMemoryStream extends PDSt
      *
      * @throws IOException If an IO error occurs during reading.
      */
-    public InputStream createInputStream()
+    public InputStream createInputStream() throws IOException
     {
         return new ByteArrayInputStream( data );
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java?rev=1604681&r1=1604680&r2=1604681&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java Mon Jun 23
02:19:39 2014
@@ -691,10 +691,6 @@ public abstract class PDFont implements 
      */
     public boolean isSymbolicFont()
     {
-        if (getFontDescriptor() == null)
-        {
-            return false;
-        }
         return getFontDescriptor().isSymbolic();
     }
 



Mime
View raw message