1.1 enabled
authoramwaterhouse <Andrew Waterhouse>
Thu, 18 Jan 2007 16:46:10 +0000 (16:46 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 18 Jan 2007 16:46:10 +0000 (16:46 +0000)
src/jalview/io/FastaFile.java

index 75915c1..d5a6a66 100755 (executable)
@@ -80,9 +80,10 @@ public class FastaFile extends AlignFile
                     if (annotation)\r
                     {\r
                       Annotation[] anots = new Annotation[sb.length()];\r
+                      String anotString = sb.toString();\r
                       for (int i = 0; i < sb.length(); i++)\r
                       {\r
-                        anots[i] = new Annotation(sb.substring(i, i+1),\r
+                        anots[i] = new Annotation(anotString.substring(i, i+1),\r
                                                   null,\r
                                                   ' ', 0);\r
                       }\r
@@ -90,7 +91,7 @@ public class FastaFile extends AlignFile
                           seq.getName().substring(2), seq.getDescription(),\r
                           anots);\r
 \r
-                      annotations.add(aa);\r
+                      annotations.addElement(aa);\r
                     }\r
                     annotation = true;\r
                   }\r
@@ -127,9 +128,10 @@ public class FastaFile extends AlignFile
         if (annotation)\r
         {\r
           Annotation[] anots = new Annotation[sb.length()];\r
+          String anotString = sb.toString();\r
           for (int i = 0; i < sb.length(); i++)\r
           {\r
-            anots[i] = new Annotation(sb.substring(i, i + 1),\r
+            anots[i] = new Annotation(anotString.substring(i, i + 1),\r
                                       null,\r
                                       ' ', 0);\r
           }\r
@@ -137,7 +139,7 @@ public class FastaFile extends AlignFile
               seq.getName().substring(2), seq.getDescription(),\r
               anots);\r
 \r
-          annotations.add(aa);\r
+          annotations.addElement(aa);\r
         }\r
 \r
         else if (!firstLine)\r