JAL-1819 use Float.isNaN() to check for NaNs!
[jalview.git] / src / jalview / schemes / GraduatedColor.java
index 4f1cb58..8a55f79 100644 (file)
@@ -145,7 +145,7 @@ public class GraduatedColor
   public boolean isColored(SequenceFeature feature)
   {
     float val = feature.getScore();
-    if (val == Float.NaN)
+    if (Float.isNaN(val))
     {
       return true;
     }
@@ -153,7 +153,7 @@ public class GraduatedColor
     {
       return true;
     }
-    if (this.thrsh == Float.NaN)
+    if (Float.isNaN(this.thrsh))
     {
       return true;
     }
@@ -211,7 +211,7 @@ public class GraduatedColor
       return getMaxColor();
     }
     float scr = feature.getScore();
-    if (scr == Float.NaN)
+    if (Float.isNaN(scr))
     {
       return getMinColor();
     }