pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java?rev=1868302&r1=1868301&r2=1868302&view=diff
==============================================================================
--- pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java
(original)
+++ pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java
Fri Oct 11 17:01:07 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