git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b9926a3
)
Catch numberformatexceptions
author
amwaterhouse
<Andrew Waterhouse>
Mon, 31 Oct 2005 15:52:49 +0000
(15:52 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Mon, 31 Oct 2005 15:52:49 +0000
(15:52 +0000)
src/jalview/io/AlignFile.java
patch
|
blob
|
history
diff --git
a/src/jalview/io/AlignFile.java
b/src/jalview/io/AlignFile.java
index
3a05402
..
5b94eb8
100755
(executable)
--- a/
src/jalview/io/AlignFile.java
+++ b/
src/jalview/io/AlignFile.java
@@
-199,20
+199,27
@@
public abstract class AlignFile extends FileParse
if (id.indexOf("/") > 0)
\r
{
\r
st = new StringTokenizer(id, "/");
\r
if (id.indexOf("/") > 0)
\r
{
\r
st = new StringTokenizer(id, "/");
\r
+ String limits=null;
\r
+ try{
\r
+ if (st.countTokens() == 2)
\r
+ {
\r
+ id = st.nextToken();
\r
\r
\r
- if (st.countTokens() == 2)
\r
- {
\r
- id = st.nextToken();
\r
-
\r
- String tmp = st.nextToken();
\r
+ limits = st.nextToken();
\r
\r
\r
- st = new StringTokenizer(tmp, "-");
\r
+ st = new StringTokenizer(limits, "-");
\r
\r
\r
- if (st.countTokens() == 2)
\r
- {
\r
- seq.setStart( Integer.valueOf(st.nextToken()).intValue() );
\r
- seq.setEnd( Integer.valueOf(st.nextToken()).intValue() );
\r
+ if (st.countTokens() == 2)
\r
+ {
\r
+ seq.setStart(Integer.valueOf(st.nextToken()).intValue());
\r
+ seq.setEnd(Integer.valueOf(st.nextToken()).intValue());
\r
+ }
\r
}
\r
}
\r
+ }catch(NumberFormatException ex)
\r
+ {
\r
+ // Problem parsing sequence limits. Just add it back to the
\r
+ // Id so we dont lose this info
\r
+ id += "/" + limits;
\r
}
\r
}
\r
seq.setName(id);
\r
}
\r
}
\r
seq.setName(id);
\r