pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1827079 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java
Date Sat, 17 Mar 2018 12:18:06 GMT
Author: msahyoun
Date: Sat Mar 17 12:18:06 2018
New Revision: 1827079

URL: http://svn.apache.org/viewvc?rev=1827079&view=rev
Log:
PDFBOX-4134: use Float.compare

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java?rev=1827079&r1=1827078&r2=1827079&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java
Sat Mar 17 12:18:06 2018
@@ -137,7 +137,7 @@ public abstract class BlendMode
         public float blendChannel(float srcValue, float dstValue)
         {
             // See PDF 2.0 specification
-            if (dstValue == 0)
+            if (Float.compare(dstValue,0) == 0)
             {
                 return 0;
             }
@@ -155,7 +155,7 @@ public abstract class BlendMode
         public float blendChannel(float srcValue, float dstValue)
         {
             // See PDF 2.0 specification
-            if (dstValue == 1)
+            if (Float.compare(dstValue, 1) == 0)
             {
                 return 1;
             }



Mime
View raw message