pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1827075 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange: logicalstructure/PDStructureNode.java taggedpdf/PDStandardAttributeObject.java
Date Sat, 17 Mar 2018 11:39:01 GMT
Author: msahyoun
Date: Sat Mar 17 11:39:01 2018
New Revision: 1827075

URL: http://svn.apache.org/viewvc?rev=1827075&view=rev
Log:
PDFBOX-4071, PDFBOX-4134: mark overriding method, use Float.compare, move variabe declaration

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/PDStandardAttributeObject.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java?rev=1827075&r1=1827074&r2=1827075&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
Sat Mar 17 11:39:01 2018
@@ -63,6 +63,7 @@ public abstract class PDStructureNode im
     /**
      * {@inheritDoc}
      */
+    @Override
     public COSDictionary getCOSObject()
     {
         return dictionary;

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/PDStandardAttributeObject.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/PDStandardAttributeObject.java?rev=1827075&r1=1827074&r2=1827075&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/PDStandardAttributeObject.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/PDStandardAttributeObject.java
Sat Mar 17 11:39:01 2018
@@ -33,6 +33,10 @@ import org.apache.pdfbox.pdmodel.graphic
  */
 public abstract class PDStandardAttributeObject extends PDAttributeObject
 {
+    /**
+     * An "unspecified" default float value.
+     */
+    protected static final float UNSPECIFIED = -1.f;
 
     /**
      * Default constructor.
@@ -289,11 +293,6 @@ public abstract class PDStandardAttribut
     }
 
     /**
-     * An "unspecified" default float value.
-     */
-    protected static final float UNSPECIFIED = -1.f;
-
-    /**
      * Gets a number or an array of numbers.
      * 
      * @param name the attribute name
@@ -321,7 +320,7 @@ public abstract class PDStandardAttribut
         {
             return ((COSNumber) v).floatValue();
         }
-        if (defaultValue == UNSPECIFIED)
+        if (Float.compare(defaultValue, UNSPECIFIED) == 0)
         {
             return null;
         }



Mime
View raw message