pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1808914 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2.java
Date Tue, 19 Sep 2017 16:53:20 GMT
Author: tilman
Date: Tue Sep 19 16:53:19 2017
New Revision: 1808914

URL: http://svn.apache.org/viewvc?rev=1808914&view=rev
Log:
PDFBOX-2852: optimize by not instanciating PDStream twice

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2.java?rev=1808914&r1=1808913&r2=1808914&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2.java Tue
Sep 19 16:53:19 2017
@@ -97,15 +97,12 @@ public class PDCIDFontType2 extends PDCI
             PDStream stream = null;
             if (fd != null)
             {
-                if (fd.getFontFile2() != null)
-                {
-                    stream = fd.getFontFile2();
-                }
-                else if (fd.getFontFile3() != null)
+                stream = fd.getFontFile2();
+                if (stream == null)
                 {
                     stream = fd.getFontFile3();
                 }
-                else
+                if (stream == null)
                 {
                     // Acrobat looks in FontFile too, even though it is not in the spec,
see PDFBOX-2599
                     stream = fd.getFontFile();



Mime
View raw message