pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1584125 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/JPEGUtil.java
Date Wed, 02 Apr 2014 18:41:00 GMT
Author: tilman
Date: Wed Apr  2 18:40:59 2014
New Revision: 1584125

URL: http://svn.apache.org/r1584125
Log:
PDFBOX-1975: fix for JDK5

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/JPEGUtil.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/JPEGUtil.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/JPEGUtil.java?rev=1584125&r1=1584124&r2=1584125&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/JPEGUtil.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/JPEGUtil.java Wed Apr
 2 18:40:59 2014
@@ -67,22 +67,22 @@ class JPEGUtil
         {
             jfifChild = (Element) jfifNodeList.item(0);
         }
-        if (jfifChild.getAttribute("majorVersion").isEmpty())
+        if (jfifChild.getAttribute("majorVersion").length() == 0)
         {
             jfifChild.setAttribute("majorVersion", "1");
         }
-        if (jfifChild.getAttribute("minorVersion").isEmpty())
+        if (jfifChild.getAttribute("minorVersion").length() == 0)
         {
             jfifChild.setAttribute("minorVersion", "2");
         }
         jfifChild.setAttribute("resUnits", "1"); // inch
         jfifChild.setAttribute("Xdensity", Integer.toString(dpi));
         jfifChild.setAttribute("Ydensity", Integer.toString(dpi));
-        if (jfifChild.getAttribute("thumbWidth").isEmpty())
+        if (jfifChild.getAttribute("thumbWidth").length() == 0)
         {
             jfifChild.setAttribute("thumbWidth", "0");
         }
-        if (jfifChild.getAttribute("thumbHeight").isEmpty())
+        if (jfifChild.getAttribute("thumbHeight").length() == 0)
         {
             jfifChild.setAttribute("thumbHeight", "0");
         }



Mime
View raw message