JAL-1953 JAL-2889 don’t read additional lines when looking for phyloxml header
authorJim Procter <j.procter@dundee.ac.uk>
Fri, 3 Jun 2022 13:15:04 +0000 (14:15 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Fri, 3 Jun 2022 13:15:04 +0000 (14:15 +0100)
src/jalview/io/IdentifyFile.java

index d2c586a..cab3e60 100755 (executable)
@@ -394,10 +394,8 @@ public class IdentifyFile
         }
         else // phylogenetic file
         {
-          String identifier = data.toLowerCase();
-          String secondLine = source.nextLine().toLowerCase();
-          if (identifier.startsWith("<phyloxml")
-                  || secondLine.startsWith("<phyloxml"))
+          // may also have a <xml header before hand, probably need to check it 
+          if (data.toLowerCase(Locale.ROOT).startsWith("<phyloxml"))
           {
             reply = FileFormat.PhyloXML;
             break;