[Swift-commit] r2181 - trunk/src/org/griphyn/vdl/util

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Thu Aug 7 08:34:45 CDT 2008


Author: benc
Date: 2008-08-07 08:34:45 -0500 (Thu, 07 Aug 2008)
New Revision: 2181

Modified:
   trunk/src/org/griphyn/vdl/util/VDL2Config.java
Log:
-config option to override config file was ignored in some cases; most immediately it meant that replication parameters were read from the default config, not a per-run overridden config file.

Modified: trunk/src/org/griphyn/vdl/util/VDL2Config.java
===================================================================
--- trunk/src/org/griphyn/vdl/util/VDL2Config.java	2008-08-07 13:31:47 UTC (rev 2180)
+++ trunk/src/org/griphyn/vdl/util/VDL2Config.java	2008-08-07 13:34:45 UTC (rev 2181)
@@ -24,8 +24,10 @@
 	private static VDL2Config config;
 
 	public static VDL2Config getConfig() throws IOException {
-		VDL2Config conf = getDefaultConfig();
-		return conf.check();
+		if(config == null) {
+			config = getDefaultConfig();
+		}
+		return config.check();
 	}
 
 	private static synchronized VDL2Config getDefaultConfig() throws IOException {
@@ -42,14 +44,15 @@
 	public static VDL2Config getConfig(String file) throws IOException {
 		VDL2Config c;
 		try {
-			VDL2Config config = getConfig();
-			c = new VDL2Config(config);
+			VDL2Config d = getConfig();
+			c = new VDL2Config(d);
 		}
 		catch (Exception e) {
 			c = new VDL2Config();
 		}
 		c.load(file);
-		return c.check();
+		config = c;
+		return config.check();
 	}
 
 	private List files, tried;




More information about the Swift-commit mailing list