Resolved merge conflict in EdtiCommandTest.java
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Thu, 23 Jul 2015 11:44:08 +0000 (12:44 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Thu, 23 Jul 2015 11:44:08 +0000 (12:44 +0100)
13 files changed:
TESTNG [new file with mode: 0644]
src/jalview/analysis/AlignmentSorter.java
src/jalview/appletgui/IdPanel.java
src/jalview/datamodel/Annotation.java
src/jalview/io/AnnotationFile.java
src/jalview/io/FeaturesFile.java
src/jalview/io/SequenceAnnotationReport.java
src/jalview/io/vamsas/Sequencefeature.java
src/jalview/renderer/seqfeatures/FeatureRenderer.java
src/jalview/schemes/GraduatedColor.java
src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java
src/jalview/ws/jws2/AADisorderClient.java
test/jalview/commands/EditCommandTest.java

diff --git a/TESTNG b/TESTNG
new file mode 100644 (file)
index 0000000..f18885f
--- /dev/null
+++ b/TESTNG
@@ -0,0 +1,2 @@
+# Summary of TestNG for this branch
+"Functional" Tests: 242 ran, 121 failed.
index 2fad332..0022af6 100755 (executable)
@@ -820,7 +820,7 @@ public class AlignmentSorter
         else
         {
           // or, also take a look at the scores if necessary.
-          if (!ignoreScore && sf[f].getScore() != Float.NaN)
+          if (!ignoreScore && !Float.isNaN(sf[f].getScore()))
           {
             if (seqScores[i] == 0)
             {
index 258b8b6..8f24f11 100755 (executable)
  */
 package jalview.appletgui;
 
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.util.UrlLink;
+import jalview.viewmodel.AlignmentViewport;
+
 import java.awt.BorderLayout;
 import java.awt.Panel;
 import java.awt.event.InputEvent;
@@ -29,13 +36,6 @@ import java.awt.event.MouseMotionListener;
 import java.util.List;
 import java.util.Vector;
 
-import jalview.datamodel.Sequence;
-import jalview.datamodel.SequenceFeature;
-import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
-import jalview.util.UrlLink;
-import jalview.viewmodel.AlignmentViewport;
-
 public class IdPanel extends Panel implements MouseListener,
         MouseMotionListener
 {
@@ -142,7 +142,7 @@ public class IdPanel extends Panel implements MouseListener,
             nl = true;
           }
           ;
-          if (sf[sl].getScore() != Float.NaN && sf[sl].getScore() != 0f)
+          if (!Float.isNaN(sf[sl].getScore()) && sf[sl].getScore() != 0f)
           {
             tooltiptext.append(" Score = ");
             tooltiptext.append(sf[sl].getScore());
index dae81ef..71ebbb3 100755 (executable)
@@ -107,9 +107,13 @@ public class Annotation
       return;
     }
     if (that.displayCharacter != null)
+    {
       displayCharacter = new String(that.displayCharacter);
+    }
     if (that.description != null)
+    {
       description = new String(that.description);
+    }
     secondaryStructure = that.secondaryStructure;
     value = that.value;
     colour = that.colour;
@@ -168,7 +172,7 @@ public class Annotation
     {
       sb.append(",");
     }
-    if (value != Float.NaN)
+    if (!Float.isNaN(value))
     {
       sb.append(value);
     }
index 88cb46e..7702792 100755 (executable)
@@ -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 = ",";
index 57f6384..fbe871b 100755 (executable)
@@ -1384,7 +1384,7 @@ public class FeaturesFile extends AlignFile
             out.append(next[j].end);
             out.append("\t");
             out.append(next[j].type);
-            if (next[j].score != Float.NaN)
+            if (!Float.isNaN(next[j].score))
             {
               out.append("\t");
               out.append(next[j].score);
index 7c96d45..6d8ce5f 100644 (file)
@@ -152,7 +152,7 @@ public class SequenceAnnotationReport
               }
             }
             // check score should be shown
-            if (feature.getScore() != Float.NaN)
+            if (!Float.isNaN(feature.getScore()))
             {
               float[][] rng = (minmax == null) ? null : ((float[][]) minmax
                       .get(feature.getType()));
index 3d598d2..ffc9998 100644 (file)
  */
 package jalview.io.vamsas;
 
+import jalview.bin.Cache;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceI;
+import jalview.io.VamsasAppDatastore;
+import jalview.util.UrlLink;
+
 import java.util.Enumeration;
 import java.util.Vector;
 
@@ -31,11 +37,6 @@ import uk.ac.vamsas.objects.core.RangeAnnotation;
 import uk.ac.vamsas.objects.core.Score;
 import uk.ac.vamsas.objects.core.Seg;
 import uk.ac.vamsas.objects.utils.Properties;
-import jalview.bin.Cache;
-import jalview.datamodel.SequenceFeature;
-import jalview.datamodel.SequenceI;
-import jalview.io.VamsasAppDatastore;
-import jalview.util.UrlLink;
 
 /**
  * @author JimP
@@ -207,7 +208,7 @@ public class Sequencefeature extends Rangetype
     {
       for (int i = 0, iSize = feature.links.size(); i < iSize; i++)
       {
-        String link = (String) feature.links.elementAt(i);
+        String link = feature.links.elementAt(i);
         UrlLink ulink = new UrlLink(link);
         if (ulink.isValid())
         {
@@ -220,7 +221,7 @@ public class Sequencefeature extends Rangetype
       }
     }
     dsa.setGroup(feature.getFeatureGroup());
-    if (feature.getScore() != Float.NaN)
+    if (!Float.isNaN(feature.getScore()))
     {
       Score fscore = new Score();
       dsa.setScore(new Score[]
index 7eda2f7..0f2a49c 100644 (file)
@@ -349,7 +349,7 @@ public class FeatureRenderer extends
         else if (showFeature(sequenceFeature))
         {
           if (av_isShowSeqFeatureHeight
-                  && sequenceFeature.score != Float.NaN)
+                  && !Float.isNaN(sequenceFeature.score))
           {
             renderScoreFeature(g, seq,
                     seq.findIndex(sequenceFeature.begin) - 1,
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();
     }
index 674f3d1..19c6ca8 100644 (file)
@@ -369,7 +369,7 @@ public abstract class FeatureRendererModel implements
         {
           allfeatures.add(features[index].getType());
         }
-        if (features[index].score != Float.NaN)
+        if (!Float.isNaN(features[index].score))
         {
           int nonpos = features[index].getBegin() >= 1 ? 0 : 1;
           float[][] mm = (float[][]) minmax.get(features[index].getType());
index dfb13a6..91be2e6 100644 (file)
@@ -265,7 +265,7 @@ public class AADisorderClient extends JabawsCalcWorker implements
                           + rn.from, base + rn.to, methodName);
                 }
                 dseq.addSequenceFeature(sf);
-                if (last != val && last != Float.NaN)
+                if (last != val && !Float.isNaN(last))
                 {
                   fc.put(sf.getType(), sf);
                 }
index 375ae55..6fa7c22 100644 (file)
@@ -31,7 +31,7 @@ public class EditCommandTest
   private Alignment al;
 
  @BeforeMethod(alwaysRun = true)
-  public void setUp()
+   public void setUp()
   {
     testee = new EditCommand();
     seqs = new SequenceI[4];