From: Jim Procter Date: Mon, 22 Jun 2015 18:43:33 +0000 (+0100) Subject: JAL-1270 fix logic in stockholm test allowing annotation.description to be equivalent... X-Git-Tag: Release_2_10_0~296^2~137^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4740ac2539b6c62c36a0c79ec6880237e50ea3f4;p=jalview.git JAL-1270 fix logic in stockholm test allowing annotation.description to be equivalent if both are null, or one or both is an empty string, or a whitespace string --- diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index c3fd4e3..3c78275 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -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()