JAL-2598 Sequence.getSequence return a copy of the char array
[jalview.git] / src / jalview / io / StructureFile.java
index ab220f0..7628115 100644 (file)
@@ -392,8 +392,10 @@ public abstract class StructureFile extends AlignFile
 
   public static boolean isRNA(SequenceI seq)
   {
-    for (char c : seq.getSequence())
+    int length = seq.getLength();
+    for (int i = 0; i < length; i++)
     {
+      char c = seq.getCharAt(i);
       if ((c != 'A') && (c != 'C') && (c != 'G') && (c != 'U'))
       {
         return false;