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:
544bd63
)
JAL-4333 - prophylactically check we have not run out of aligned codons - increase...
patch/JAL-4333_translatecodonexception
author
Jim Procter
<jprocter@dundee.ac.uk>
Wed, 4 Dec 2024 16:32:33 +0000
(16:32 +0000)
committer
Jim Procter
<jprocter@dundee.ac.uk>
Wed, 4 Dec 2024 16:32:33 +0000
(16:32 +0000)
src/jalview/analysis/Dna.java
patch
|
blob
|
history
diff --git
a/src/jalview/analysis/Dna.java
b/src/jalview/analysis/Dna.java
index
9a99b69
..
a4dc5d0
100644
(file)
--- a/
src/jalview/analysis/Dna.java
+++ b/
src/jalview/analysis/Dna.java
@@
-590,10
+590,11
@@
public class Dna
{
/*
* Compare this codon's base positions with those currently aligned to
- * this column in the translation.
+ * this column in the translation. Always check we've not run out of existing aligned codons !
*/
- final int compareCodonPos = compareCodonPos(alignedCodon,
- alignedCodons[aspos]);
+ final int compareCodonPos = (aspos < alignedCodons.length)
+ ? compareCodonPos(alignedCodon, alignedCodons[aspos])
+ : -1;
switch (compareCodonPos)
{
case -1: