From 62737d15c0edb48128eb9ac6fe7fa419ab984125 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 11 Jul 2005 13:48:03 +0000 Subject: [PATCH] Add test case if code version not found --- src/jalview/bin/Cache.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index d4c7e5d..8e5e240 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -90,11 +90,22 @@ public class Cache catch (Exception ex) { System.out.println("Error reading build details: "+ex); + applicationProperties.remove("VERSION"); } String jnlpVersion = System.getProperty("jalview.version"); String codeVersion = getProperty("VERSION"); + if(codeVersion==null) + { + // THIS SHOULD ONLY BE THE CASE WHEN TESTING!! + codeVersion = "Test"; + jnlpVersion = "Test"; + setProperty("jalview.version", jnlpVersion); + setProperty("VERSION", codeVersion); + } + + // jnlpVersion will be null if we're using InstallAnywhere if(jnlpVersion==null) { @@ -112,7 +123,7 @@ public class Cache setProperty("jalview.version", line); } }catch(Exception ex) - {setProperty("jalview.version", codeVersion);} + { setProperty("jalview.version", codeVersion); } } } -- 1.7.10.2