mirror of
https://github.com/corda/corda.git
synced 2025-01-18 02:39:51 +00:00
Refactored the previous bug fix to minimize duplication by reusing an existing function.
Bear in mind that the condition in the previous code was (config == null) and now is (config == null || config.equals("")).
This commit is contained in:
parent
80d279a70e
commit
8eaf237a27
@ -33,9 +33,8 @@ public class CordaCaplet extends Capsule {
|
||||
|
||||
private Config parseConfigFile(List<String> args) {
|
||||
this.baseDir = getBaseDirectory(args);
|
||||
String config = getOptionMultiple(args, Arrays.asList("--config-file", "-f"));
|
||||
|
||||
File configFile = (config == null) ? new File(baseDir, "node.conf") : new File(config);
|
||||
File configFile = getConfigFile(args, baseDir);
|
||||
try {
|
||||
ConfigParseOptions parseOptions = ConfigParseOptions.defaults().setAllowMissing(false);
|
||||
Config defaultConfig = ConfigFactory.parseResources("corda-reference.conf", parseOptions);
|
||||
|
Loading…
Reference in New Issue
Block a user