fix for JAL-1380 and efficiency todo for JAL-1381
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 4 Oct 2013 14:03:52 +0000 (15:03 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 4 Oct 2013 14:03:52 +0000 (15:03 +0100)
src/jalview/datamodel/Sequence.java

index 580c850..fa063ff 100755 (executable)
@@ -707,6 +707,7 @@ public class Sequence implements SequenceI
     {
       tmp = new char[i];
       System.arraycopy(sequence, 0, tmp, 0, i);
+      j=sequence.length;
     }
     else
     {
@@ -715,6 +716,9 @@ public class Sequence implements SequenceI
       System.arraycopy(sequence, j, tmp, i, sequence.length - j);
     }
     boolean createNewDs = false;
+    // TODO: take a look at the new dataset creation validation method below -
+    // this could become time comsuming for large sequences - consider making it
+    // more efficient
     for (int s = i; s < j; s++)
     {
       if (jalview.schemes.ResidueProperties.aaIndex[sequence[s]] != 23)