Add test case if code version not found
authoramwaterhouse <Andrew Waterhouse>
Mon, 11 Jul 2005 13:48:03 +0000 (13:48 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 11 Jul 2005 13:48:03 +0000 (13:48 +0000)
src/jalview/bin/Cache.java

index d4c7e5d..8e5e240 100755 (executable)
@@ -90,11 +90,22 @@ public class Cache
          catch (Exception ex)\r
          {\r
            System.out.println("Error reading build details: "+ex);\r
+           applicationProperties.remove("VERSION");\r
         }\r
 \r
         String jnlpVersion = System.getProperty("jalview.version");\r
         String codeVersion = getProperty("VERSION");\r
 \r
+        if(codeVersion==null)\r
+        {\r
+          // THIS SHOULD ONLY BE THE CASE WHEN TESTING!!\r
+          codeVersion = "Test";\r
+          jnlpVersion = "Test";\r
+          setProperty("jalview.version", jnlpVersion);\r
+          setProperty("VERSION", codeVersion);\r
+        }\r
+\r
+\r
         // jnlpVersion will be null if we're using InstallAnywhere\r
         if(jnlpVersion==null)\r
         {\r
@@ -112,7 +123,7 @@ public class Cache
               setProperty("jalview.version", line);\r
             }\r
           }catch(Exception ex)\r
-          {setProperty("jalview.version", codeVersion);}\r
+          {  setProperty("jalview.version", codeVersion); }\r
         }\r
     }\r
 \r