git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1152 bug fix for 'no sort' case + tests for autocalc placement
[jalview.git]
/
src
/
jalview
/
analysis
/
AnnotationSorter.java
diff --git
a/src/jalview/analysis/AnnotationSorter.java
b/src/jalview/analysis/AnnotationSorter.java
index
fa9c1a8
..
b9e9ed5
100644
(file)
--- a/
src/jalview/analysis/AnnotationSorter.java
+++ b/
src/jalview/analysis/AnnotationSorter.java
@@
-21,7
+21,7
@@
public class AnnotationSorter
{
SEQUENCE_AND_LABEL, LABEL_AND_SEQUENCE, NONE
}
{
SEQUENCE_AND_LABEL, LABEL_AND_SEQUENCE, NONE
}
-
+
private final AlignmentI alignment;
private boolean showAutocalcAbove;
private final AlignmentI alignment;
private boolean showAutocalcAbove;
@@
-158,7
+158,7
@@
public class AnnotationSorter
return 0;
}
};
return 0;
}
};
-
+
/**
* Sort by the specified ordering of sequence-specific annotations.
*
/**
* Sort by the specified ordering of sequence-specific annotations.
*
@@
-168,16
+168,13
@@
public class AnnotationSorter
public void sort(AlignmentAnnotation[] alignmentAnnotations,
SequenceAnnotationOrder order)
{
public void sort(AlignmentAnnotation[] alignmentAnnotations,
SequenceAnnotationOrder order)
{
- if (order != SequenceAnnotationOrder.NONE)
- {
- Comparator<? super AlignmentAnnotation> comparator = getComparator(order);
+ Comparator<? super AlignmentAnnotation> comparator = getComparator(order);
- if (alignmentAnnotations != null)
+ if (alignmentAnnotations != null)
+ {
+ synchronized (alignmentAnnotations)
{
{
- synchronized (alignmentAnnotations)
- {
- Arrays.sort(alignmentAnnotations, comparator);
- }
+ Arrays.sort(alignmentAnnotations, comparator);
}
}
}
}
}
}