JAL-1270 fix logic in stockholm test allowing annotation.description to be equivalent...
authorJim Procter <jprocter@issues.jalview.org>
Mon, 22 Jun 2015 18:43:33 +0000 (19:43 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 22 Jun 2015 18:43:33 +0000 (19:43 +0100)
test/jalview/io/StockholmFileTest.java

index c3fd4e3..3c78275 100644 (file)
@@ -349,9 +349,11 @@ public class StockholmFileTest
                 an_new.displayCharacter.trim())
                 || !("" + an_or.secondaryStructure).trim().equals(
                         ("" + an_new.secondaryStructure).trim())
-                || (an_or.description != an_new.description && (an_or.description == null
-                        || an_new.description == null || !an_or.description
-                          .equals(an_new.description))))
+                || (an_or.description != an_new.description && !((an_or.description == null && an_new.description
+                        .trim().length() == 0)
+                        || (an_new.description == null && an_or.description
+                                .trim().length() == 0) || an_or.description
+                        .trim().equals(an_new.description.trim()))))
         {
           System.err.println("Annotation Element Mismatch\nElement " + i
                   + " in original: " + annot_or.annotations[i].toString()