pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1825551 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox: text/PDFTextStripper.java util/DateConverter.java util/Version.java
Date Wed, 28 Feb 2018 11:28:30 GMT
Author: msahyoun
Date: Wed Feb 28 11:28:30 2018
New Revision: 1825551

URL: http://svn.apache.org/viewvc?rev=1825551&view=rev
Log:
PDFBOX-4118: retain exception in log message; use LOG.debug for ignored exceptions

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/DateConverter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Version.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java?rev=1825551&r1=1825550&r2=1825551&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java Wed Feb
28 11:28:30 2018
@@ -83,6 +83,7 @@ public class PDFTextStripper extends Leg
         {
             // PDFBOX-1946 when run in an applet
             // ignore and use default
+            LOG.debug("Couldn't read system properties - using defauults", e);
         }
         if (strIndent != null && strIndent.length() > 0)
         {
@@ -1823,7 +1824,7 @@ public class PDFTextStripper extends Leg
         catch (IOException e)
         {
             LOG.warn("Could not parse BidiMirroring.txt, mirroring char map will be empty:
"
-                    + e.getMessage());
+                    + e.getMessage(), e);
         }
     }
 

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/DateConverter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/DateConverter.java?rev=1825551&r1=1825550&r2=1825551&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/DateConverter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/DateConverter.java Wed Feb 28
11:28:30 2018
@@ -25,6 +25,9 @@ import java.util.Locale;
 import java.util.SimpleTimeZone;
 import java.util.TimeZone;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import org.apache.pdfbox.cos.COSString;
 
 /*
@@ -65,6 +68,8 @@ public final class DateConverter
     {
     }
 
+    private static final Log LOG = LogFactory.getLog(DateConverter.class);
+
     // milliseconds/1000 = seconds; seconds / 60 = minutes; minutes/60 = hours
     private static final int MINUTES_PER_HOUR = 60;
     private static final int SECONDS_PER_MINUTE = 60;
@@ -553,6 +558,7 @@ public final class DateConverter
         }
         catch (IllegalArgumentException ill) 
         {
+            LOG.debug("Couldn't parse arguments text:" + text + " initialWhere:" + initialWhere,
ill);
             return  null;
         }
         initialWhere.setIndex(where.getIndex());

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Version.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Version.java?rev=1825551&r1=1825550&r2=1825551&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Version.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/Version.java Wed Feb 28 11:28:30
2018
@@ -21,11 +21,16 @@ import java.io.IOException;
 import java.net.URL;
 import java.util.Properties;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * Exposes PDFBox version.
  */
 public final class Version
 {
+    private static final Log LOG = LogFactory.getLog(Version.class);
+
     private static final String PDFBOX_VERSION_PROPERTIES =
             "org/apache/pdfbox/resources/version.properties";
 
@@ -52,6 +57,7 @@ public final class Version
         }
         catch (IOException io)
         {
+            LOG.debug("Unable to read version from properties - returning null", io);
             return null;
         }
     }



Mime
View raw message