Merge branch 'develop' into releases/Release_2_11_2_Branch
[jalview.git] / src / jalview / datamodel / BinarySequence.java
index 5789b2b..cea9de7 100755 (executable)
@@ -69,6 +69,7 @@ public class BinarySequence extends Sequence
   {
     int nores = (isNa) ? ResidueProperties.maxNucleotideIndex
             : ResidueProperties.maxProteinIndex;
+
     dbinary = new double[getLength() * nores];
 
     return nores;
@@ -118,10 +119,10 @@ public class BinarySequence extends Sequence
   {
     if (isNa != smtrx.isDNA())
     {
-      throw new InvalidSequenceTypeException("matrix "
-              + smtrx.getClass().getCanonicalName()
-              + " is not a valid matrix for "
-              + (isNa ? "nucleotide" : "protein") + "sequences");
+      throw new InvalidSequenceTypeException(
+              "matrix " + smtrx.getClass().getCanonicalName()
+                      + " is not a valid matrix for "
+                      + (isNa ? "nucleotide" : "protein") + "sequences");
     }
     matrixEncode(smtrx.isDNA() ? ResidueProperties.nucleotideIndex
             : ResidueProperties.aaIndex, smtrx.getMatrix());
@@ -131,7 +132,7 @@ public class BinarySequence extends Sequence
   {
     int nores = initMatrixGetNoRes();
 
-    for (int i = 0, iSize = getSequence().length; i < iSize; i++)
+    for (int i = 0, iSize = getLength(); i < iSize; i++)
     {
       int aanum = nores - 1;
 
@@ -168,7 +169,7 @@ public class BinarySequence extends Sequence
 
     for (int i = 0; i < binary.length; i++)
     {
-      out += (new Integer(binary[i])).toString();
+      out += (Integer.valueOf(binary[i])).toString();
 
       if (i < (binary.length - 1))
       {