pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1812313 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java
Date Mon, 16 Oct 2017 19:13:29 GMT
Author: tilman
Date: Mon Oct 16 19:13:29 2017
New Revision: 1812313

URL: http://svn.apache.org/viewvc?rev=1812313&view=rev
Log:
PDFBOX-2852: avoid NPE, improve message

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java?rev=1812313&r1=1812312&r2=1812313&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java Mon
Oct 16 19:13:29 2017
@@ -1850,7 +1850,14 @@ public class PDFTextStripper extends Leg
         InputStream input = PDFTextStripper.class.getClassLoader().getResourceAsStream(path);
         try
         {
-            parseBidiFile(input);
+            if (input != null)
+            {
+                parseBidiFile(input);
+            }
+            else
+            {
+                LOG.warn("Could not find '" + path + "', mirroring char map will be empty:
");
+            }
         }
         catch (IOException e)
         {



Mime
View raw message