Merge branch 'release/2_9_documentation' into develop
[jalview.git] / src / jalview / io / AnnotationFile.java
index 88cb46e..6cce211 100755 (executable)
@@ -88,8 +88,8 @@ public class AnnotationFile
   }
 
   /**
-   * convenience method for pre-2.8.3 annotation files which have no view,
-   * hidden columns or hidden row keywords.
+   * convenience method for pre-2.9 annotation files which have no view, hidden
+   * columns or hidden row keywords.
    * 
    * @param annotations
    * @param list
@@ -241,7 +241,7 @@ public class AnnotationFile
                     && row.annotations[j].displayCharacter.length() > 0 && !row.annotations[j].displayCharacter
                     .equals(" "));
             hasGlyphs |= (row.annotations[j].secondaryStructure != 0 && row.annotations[j].secondaryStructure != ' ');
-            hasValues |= (row.annotations[j].value != Float.NaN); // NaNs can't
+            hasValues |= (!Float.isNaN(row.annotations[j].value)); // NaNs can't
             // be
             // rendered..
             hasText |= (row.annotations[j].description != null && row.annotations[j].description
@@ -331,13 +331,13 @@ public class AnnotationFile
             }
             if (hasValues)
             {
-              if (row.annotations[j].value != Float.NaN)
+              if (!Float.isNaN(row.annotations[j].value))
               {
                 text.append(comma + row.annotations[j].value);
               }
               else
               {
-                System.err.println("Skipping NaN - not valid value.");
+                // System.err.println("Skipping NaN - not valid value.");
                 text.append(comma + 0f);// row.annotations[j].value);
               }
               comma = ",";