JAL-2598 Sequence.getSequence return a copy of the char array
[jalview.git] / src / jalview / datamodel / xdb / embl / EmblEntry.java
index c3d4e66..5784f04 100644 (file)
@@ -367,7 +367,8 @@ public class EmblEntry
         System.err
                 .println("Implementation Notice: EMBLCDS records not properly supported yet - Making up the CDNA region of this sequence... may be incorrect ("
                         + sourceDb + ":" + getAccession() + ")");
-        if (translationLength * 3 == (1 - codonStart + dna.getSequence().length))
+        int dnaLength = dna.getLength();
+        if (translationLength * 3 == (1 - codonStart + dnaLength))
         {
           System.err
                   .println("Not allowing for additional stop codon at end of cDNA fragment... !");
@@ -377,8 +378,7 @@ public class EmblEntry
           dnaToProteinMapping = new Mapping(product, exons, new int[] { 1,
               translationLength }, 3, 1);
         }
-        if ((translationLength + 1) * 3 == (1 - codonStart + dna
-                .getSequence().length))
+        if ((translationLength + 1) * 3 == (1 - codonStart + dnaLength))
         {
           System.err
                   .println("Allowing for additional stop codon at end of cDNA fragment... will probably cause an error in VAMSAs!");