From c59ecdac585dfecc8e5ba1b0327d248b38befc9f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 29 Dec 2020 16:38:35 +0000 Subject: [PATCH] JAL-3788 synchronize concurrent findColour() and alignmentChanged() --- src/jalview/schemes/ClustalxColourScheme.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jalview/schemes/ClustalxColourScheme.java b/src/jalview/schemes/ClustalxColourScheme.java index 19723ca..5a2d5dc 100755 --- a/src/jalview/schemes/ClustalxColourScheme.java +++ b/src/jalview/schemes/ClustalxColourScheme.java @@ -20,16 +20,16 @@ */ package jalview.schemes; +import java.awt.Color; +import java.util.List; +import java.util.Map; + import jalview.api.AlignViewportI; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceI; import jalview.util.Comparison; -import java.awt.Color; -import java.util.List; -import java.util.Map; - public class ClustalxColourScheme extends ResidueColourScheme { private static final int EIGHTY_FIVE = 85; @@ -95,7 +95,7 @@ public class ClustalxColourScheme extends ResidueColourScheme } @Override - public void alignmentChanged(AnnotatedCollectionI alignment, + public synchronized void alignmentChanged(AnnotatedCollectionI alignment, Map hiddenReps) { int maxWidth = alignment.getWidth(); @@ -278,7 +278,7 @@ public class ClustalxColourScheme extends ResidueColourScheme } @Override - protected Color findColour(char c, int j, SequenceI seq) + protected synchronized Color findColour(char c, int j, SequenceI seq) { // TODO why the test for includeGaps here? if (cons2.length <= j || Comparison.isGap(c) -- 1.7.10.2