JAL-1519 - tidy build properties management code
authorJim Procter <jprocter@dundee.ac.uk>
Fri, 6 Jun 2014 10:50:22 +0000 (11:50 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Fri, 6 Jun 2014 10:50:22 +0000 (11:50 +0100)
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