pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1868303 - /pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java
Date Fri, 11 Oct 2019 17:01:12 GMT
Author: tilman
Date: Fri Oct 11 17:01:12 2019
New Revision: 1868303

URL: http://svn.apache.org/viewvc?rev=1868303&view=rev
Log:
PDFBOX-4071: revert own misguided code "simplification" because integers appeared as 12345.0

Modified:
    pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java

Modified: pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java?rev=1868303&r1=1868302&r2=1868303&view=diff
==============================================================================
--- pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java
(original)
+++ pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java
Fri Oct 11 17:01:12 2019
@@ -32,7 +32,6 @@ import org.apache.pdfbox.cos.COSFloat;
 import org.apache.pdfbox.cos.COSInteger;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSNull;
-import org.apache.pdfbox.cos.COSNumber;
 import org.apache.pdfbox.cos.COSObject;
 import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.cos.COSString;
@@ -128,9 +127,13 @@ public class PDFTreeCellRenderer extends
         {
             result = Boolean.toString(((COSBoolean) nodeValue).getValue());
         }
-        else if (nodeValue instanceof COSNumber)
+        else if (nodeValue instanceof COSFloat)
         {
-            result = Float.toString(((COSNumber) nodeValue).floatValue());
+            result = Float.toString(((COSFloat) nodeValue).floatValue());
+        }
+        else if (nodeValue instanceof COSInteger)
+        {
+            result = Integer.toString(((COSInteger) nodeValue).intValue());
         }
         else if (nodeValue instanceof COSString)
         {



Mime
View raw message