From 6819fa797b45769bb38a80230e5961e09582ed9e Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 5 Apr 2016 18:31:32 +0100 Subject: [PATCH] JAL-2046 setSequenceFeature contract implementation and warning message --- src/jalview/datamodel/Sequence.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index e3746bb..5bfdb04 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -297,7 +297,16 @@ public class Sequence extends ASequence implements SequenceI @Override public void setSequenceFeatures(SequenceFeature[] features) { - sequenceFeatures = features; + if (datasetSequence == null) + { + sequenceFeatures = features; + } + else + { + System.err + .println("Warning: JAL-2046 side effect ? Possible implementation error: overwriting dataset sequence features by setting sequence features on alignment"); + datasetSequence.setSequenceFeatures(features); + } } @Override -- 1.7.10.2