JAL-1925 update source version in license
[jalview.git] / src / jalview / io / IdentifyFile.java
index a5e7fbc..9e2a4e6 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
+ * Copyright (C) 2015 The Jalview Authors
  *
  * This file is part of Jalview.
  *
@@ -260,6 +260,10 @@ public class IdentifyFile
           {
             break;
           }
+          if (data == null)
+          {
+            break;
+          }
         }
 
         if (data.indexOf("{\"") > -1)
@@ -306,19 +310,18 @@ public class IdentifyFile
           break;
         }
 
-
         /*
          * // TODO comment out SimpleBLAST identification for Jalview 2.4.1 else
          * if (!lineswereskipped && data.indexOf("BLAST")<4) { reply =
          * "SimpleBLAST"; break;
-         *
+         * 
          * } // end comments for Jalview 2.4.1
          */
         else if (!lineswereskipped && data.charAt(0) != '*'
                 && data.charAt(0) != ' '
                 && data.indexOf(":") < data.indexOf(",")) // &&
-          // data.indexOf(",")<data.indexOf(",",
-          // data.indexOf(",")))
+        // data.indexOf(",")<data.indexOf(",",
+        // data.indexOf(",")))
         {
           // file looks like a concise JNet file
           reply = "JnetFile";
@@ -344,7 +347,7 @@ public class IdentifyFile
     if (length == 0)
     {
       System.err
-      .println("File Identification failed! - Empty file was read.");
+              .println("File Identification failed! - Empty file was read.");
       return "EMPTY DATA FILE";
     }
     return reply;