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

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Fri Jul 11 22:58:36 CDT 2014


Author: hategan
Date: 2014-07-11 22:58:36 -0500 (Fri, 11 Jul 2014)
New Revision: 7990

Modified:
   trunk/src/org/griphyn/vdl/util/SwiftConfig.java
Log:
check for null command line overrides

Modified: trunk/src/org/griphyn/vdl/util/SwiftConfig.java
===================================================================
--- trunk/src/org/griphyn/vdl/util/SwiftConfig.java	2014-07-12 03:49:50 UTC (rev 7989)
+++ trunk/src/org/griphyn/vdl/util/SwiftConfig.java	2014-07-12 03:58:36 UTC (rev 7990)
@@ -12,6 +12,7 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -164,8 +165,10 @@
         opt = opt.setIncluder(new IncluderWrapper(opt.getIncluder())).
             setSyntax(ConfigSyntax.CONF).setAllowMissing(false);
         Config conf = ConfigFactory.parseFile(new File(fileName), opt);
-        Config oconf = ConfigFactory.parseMap(override, "<command line>");
-        conf = oconf.withFallback(conf);
+        if (override != null) {
+            Config oconf = ConfigFactory.parseMap(override, "<command line>");
+            conf = oconf.withFallback(conf);
+        }
         conf = conf.resolveWith(getSubstitutions());
         ConfigTree<Object> out = SCHEMA.validate(conf);
         SwiftConfig sc = new SwiftConfig();




More information about the Swift-commit mailing list