JAL-2046 additional logic to suppress spurious implementation-error warnings
authorJim Procter <jprocter@issues.jalview.org>
Tue, 2 Aug 2016 15:22:43 +0000 (16:22 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 2 Aug 2016 15:22:43 +0000 (16:22 +0100)
src/jalview/datamodel/Sequence.java

index 31ffdfd..a857712 100755 (executable)
@@ -303,8 +303,13 @@ public class Sequence extends ASequence implements SequenceI
     }
     else
     {
-      System.err
+      if (datasetSequence.getSequenceFeatures() != features
+              && datasetSequence.getSequenceFeatures() != null
+              && datasetSequence.getSequenceFeatures().length > 0)
+      {
+        System.err
               .println("Warning: JAL-2046 side effect ? Possible implementation error: overwriting dataset sequence features by setting sequence features on alignment");
+      }
       datasetSequence.setSequenceFeatures(features);
     }
   }