git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
88d8ecb
)
JAL-2360 added check for null annotations array
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 14 Dec 2016 15:36:13 +0000
(15:36 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 14 Dec 2016 15:36:13 +0000
(15:36 +0000)
src/jalview/datamodel/Alignment.java
patch
|
blob
|
history
diff --git
a/src/jalview/datamodel/Alignment.java
b/src/jalview/datamodel/Alignment.java
index
290707d
..
49f6268
100755
(executable)
--- a/
src/jalview/datamodel/Alignment.java
+++ b/
src/jalview/datamodel/Alignment.java
@@
-1561,7
+1561,6
@@
public class Alignment implements AlignmentI
String calcId, boolean autoCalc, SequenceI seqRef,
SequenceGroup groupRef)
{
String calcId, boolean autoCalc, SequenceI seqRef,
SequenceGroup groupRef)
{
- assert (name != null);
if (annotations != null)
{
for (AlignmentAnnotation annot : getAlignmentAnnotation())
if (annotations != null)
{
for (AlignmentAnnotation annot : getAlignmentAnnotation())
@@
-1593,14
+1592,18
@@
public class Alignment implements AlignmentI
@Override
public Iterable<AlignmentAnnotation> findAnnotation(String calcId)
{
@Override
public Iterable<AlignmentAnnotation> findAnnotation(String calcId)
{
- ArrayList<AlignmentAnnotation> aa = new ArrayList<AlignmentAnnotation>();
- for (AlignmentAnnotation a : getAlignmentAnnotation())
+ List<AlignmentAnnotation> aa = new ArrayList<AlignmentAnnotation>();
+ AlignmentAnnotation[] alignmentAnnotation = getAlignmentAnnotation();
+ if (alignmentAnnotation != null)
{
{
- if (a.getCalcId() == calcId
- || (a.getCalcId() != null && calcId != null && a.getCalcId()
- .equals(calcId)))
+ for (AlignmentAnnotation a : alignmentAnnotation)
{
{
- aa.add(a);
+ if (a.getCalcId() == calcId
+ || (a.getCalcId() != null && calcId != null && a
+ .getCalcId().equals(calcId)))
+ {
+ aa.add(a);
+ }
}
}
return aa;
}
}
return aa;