JAL-1519 - tidy build properties management code
[jalview.git] / src / jalview / bin / Cache.java
index fff9daf..1214371 100755 (executable)
@@ -284,8 +284,10 @@ public class Cache
         fis = new FileInputStream(propertiesFile);
       }
       applicationProperties.load(fis);
-      applicationProperties.remove("LATEST_VERSION");
-      applicationProperties.remove("VERSION");
+      
+      // remove any old build properties
+      
+      deleteBuildProperties();
       fis.close();
     } catch (Exception ex)
     {
@@ -437,6 +439,15 @@ public class Cache
             false);
   }
 
+  private static void deleteBuildProperties()
+  {
+    applicationProperties.remove("LATEST_VERSION");
+    applicationProperties.remove("VERSION");
+    applicationProperties.remove("AUTHORS");
+    applicationProperties.remove("AUTHORFNAMES");
+    applicationProperties.remove("YEAR");
+  }
+
   /**
    * Gets Jalview application property of given key. Returns null if key not
    * found