From: amwaterhouse Date: Wed, 30 Nov 2005 15:37:08 +0000 (+0000) Subject: Name parsing X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=757598247e23283e4c7cfe34dc4a90065ce6a801;p=jalview.git Name parsing --- diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index dce2e51..e74a17b 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -74,13 +74,9 @@ public class Sequence implements SequenceI String limits = name.substring(name.lastIndexOf("/")+1); try { - StringTokenizer st = new StringTokenizer(limits, "-"); - - if (st.countTokens() == 2) - { - setStart(Integer.valueOf(st.nextToken()).intValue()); - setEnd(Integer.valueOf(st.nextToken()).intValue()); - } + StringTokenizer st = new StringTokenizer(limits, "-"); + setStart(Integer.valueOf(st.nextToken()).intValue()); + setEnd(Integer.valueOf(st.nextToken()).intValue()); // If we're still in this loop, parsing of start and end was ok // Therefore remove it from the sequence name @@ -89,7 +85,6 @@ public class Sequence implements SequenceI catch (NumberFormatException ex) { } } - } void checkValidRange()