Merge branch 'Release_2_8_2_Branch_i18n' into Release_2_8_2_Branch
[jalview.git] / src / jalview / schemabinding / version2 / JGroup.java
index b909250..3a8dab2 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -535,8 +537,11 @@ public class JGroup implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._seqList.size())
     {
-      throw new IndexOutOfBoundsException("getSeq: Index value '" + index
-              + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getSeq",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._seqList.size() - 1)).toString()
+          })); 
     }
 
     return (java.lang.String) _seqList.get(index);
@@ -1131,8 +1136,11 @@ public class JGroup implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._seqList.size())
     {
-      throw new IndexOutOfBoundsException("setSeq: Index value '" + index
-              + "' not in range [0.." + (this._seqList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setSeq",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._seqList.size() - 1)).toString()
+        })); 
     }
 
     this._seqList.set(index, vSeq);