From 757598247e23283e4c7cfe34dc4a90065ce6a801 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 30 Nov 2005 15:37:08 +0000 Subject: [PATCH] Name parsing --- src/jalview/datamodel/Sequence.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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() -- 1.7.10.2