fix for JAL-895 - new exampleFile_2_7.jar and logic to upgrade stale default startup...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 16 Sep 2011 15:35:56 +0000 (16:35 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 16 Sep 2011 15:35:56 +0000 (16:35 +0100)
examples/exampleFile_2_7.jar [new file with mode: 0644]
src/jalview/bin/Jalview.java

diff --git a/examples/exampleFile_2_7.jar b/examples/exampleFile_2_7.jar
new file mode 100644 (file)
index 0000000..6a3d639
Binary files /dev/null and b/examples/exampleFile_2_7.jar differ
index aae30b5..999e6ad 100755 (executable)
@@ -511,8 +511,15 @@ public class Jalview
             && jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true))
     {
       file = jalview.bin.Cache.getDefault("STARTUP_FILE",
-              jalview.bin.Cache.getDefault("www.jalview.org", "http://www.jalview.org")+"/examples/exampleFile_2_3.jar");
-
+              jalview.bin.Cache.getDefault("www.jalview.org", "http://www.jalview.org")+"/examples/exampleFile_2_7.jar");
+      if (file.equals("http://www.jalview.org/examples/exampleFile_2_3.jar"))
+      {
+        // hardwire upgrade of the startup file
+        file.replace("_2_3.jar","_2_7.jar");
+        // and remove the stale setting 
+        jalview.bin.Cache.removeProperty("STARTUP_FILE");
+      }
+      
       protocol = "File";
 
       if (file.indexOf("http:") > -1)