From: amwaterhouse Date: Mon, 31 Oct 2005 15:53:08 +0000 (+0000) Subject: equalsIgnoreCase CLUSTAL X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=555416956c6668d4f49d0cbf5a1e784e20636afa;p=jalview.git equalsIgnoreCase CLUSTAL --- diff --git a/src/jalview/io/ClustalFile.java b/src/jalview/io/ClustalFile.java index 981e3c9..e72e0df 100755 --- a/src/jalview/io/ClustalFile.java +++ b/src/jalview/io/ClustalFile.java @@ -55,8 +55,9 @@ public class ClustalFile Vector headers = new Vector(); Hashtable seqhash = new Hashtable(); - - String line; + StringBuffer tempseq; + String line, id; + StringTokenizer str; try { @@ -64,14 +65,13 @@ public class ClustalFile { if (line.indexOf(" ") != 0) { - StringTokenizer str = new StringTokenizer(line, " "); - String id = ""; + str = new StringTokenizer(line, " "); if (str.hasMoreTokens()) { id = str.nextToken(); - if (id.equals("CLUSTAL")) + if (id.equalsIgnoreCase("CLUSTAL")) { flag = true; } @@ -79,8 +79,6 @@ public class ClustalFile { if (flag) { - StringBuffer tempseq; - if (seqhash.containsKey(id)) { tempseq = (StringBuffer) seqhash.get(id); @@ -103,6 +101,8 @@ public class ClustalFile } } } + else + flag = true; } } }