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 (parent:
53a410e
)
ensure id string doesn't get set to the empty string (bug # 56271)
author
jprocter
<Jim Procter>
Mon, 12 Oct 2009 12:50:21 +0000
(12:50 +0000)
committer
jprocter
<Jim Procter>
Mon, 12 Oct 2009 12:50:21 +0000
(12:50 +0000)
src/MCview/PDBfile.java
patch
|
blob
|
history
diff --git
a/src/MCview/PDBfile.java
b/src/MCview/PDBfile.java
index
c671ec2
..
b368b91
100755
(executable)
--- a/
src/MCview/PDBfile.java
+++ b/
src/MCview/PDBfile.java
@@
-55,7
+55,7
@@
public class PDBfile extends jalview.io.AlignFile
public void parse() throws IOException
{
// TODO set the filename sensibly
public void parse() throws IOException
{
// TODO set the filename sensibly
- id = (inFile == null) ? "PDBFILE" : inFile.getName();
+ id = (inFile == null || inFile.getName()==null || inFile.getName().length()==0) ? "PDBFILE" : inFile.getName();
try
{
chains = new Vector();
try
{
chains = new Vector();
@@
-72,10
+72,15
@@
public class PDBfile extends jalview.io.AlignFile
{
if (line.length()>62)
{
{
if (line.length()>62)
{
+ String tid;
if (line.length()>67) {
if (line.length()>67) {
- id = line.substring(62, 67).trim();
+ tid = line.substring(62, 67).trim();
} else {
} else {
- id=line.substring(62).trim();
+ tid=line.substring(62).trim();
+ }
+ if (tid.length()>0)
+ {
+ id = tid;
}
continue;
}
}
continue;
}