From: Jim Procter Date: Tue, 5 Apr 2016 17:31:32 +0000 (+0100) Subject: JAL-2046 setSequenceFeature contract implementation and warning message X-Git-Tag: Release_2_10_0~249^2~31^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6819fa797b45769bb38a80230e5961e09582ed9e;p=jalview.git JAL-2046 setSequenceFeature contract implementation and warning message --- 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