Name parsing
authoramwaterhouse <Andrew Waterhouse>
Wed, 30 Nov 2005 15:37:08 +0000 (15:37 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 30 Nov 2005 15:37:08 +0000 (15:37 +0000)
src/jalview/datamodel/Sequence.java

index dce2e51..e74a17b 100755 (executable)
@@ -74,13 +74,9 @@ public class Sequence implements SequenceI
            String limits = name.substring(name.lastIndexOf("/")+1);\r
            try\r
            {\r
-               StringTokenizer st = new StringTokenizer(limits, "-");\r
-\r
-               if (st.countTokens() == 2)\r
-               {\r
-                 setStart(Integer.valueOf(st.nextToken()).intValue());\r
-                 setEnd(Integer.valueOf(st.nextToken()).intValue());\r
-               }\r
+             StringTokenizer st = new StringTokenizer(limits, "-");\r
+             setStart(Integer.valueOf(st.nextToken()).intValue());\r
+             setEnd(Integer.valueOf(st.nextToken()).intValue());\r
 \r
              // If we're still in this loop, parsing of start and end was ok\r
              // Therefore remove it from the sequence name\r
@@ -89,7 +85,6 @@ public class Sequence implements SequenceI
            catch (NumberFormatException ex)\r
            {      }\r
          }\r
-\r
     }\r
 \r
     void checkValidRange()\r