mirror of
https://github.com/corda/corda.git
synced 2025-05-31 22:50:53 +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) {
|
private Config parseConfigFile(List<String> args) {
|
||||||
this.baseDir = getBaseDirectory(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 {
|
try {
|
||||||
ConfigParseOptions parseOptions = ConfigParseOptions.defaults().setAllowMissing(false);
|
ConfigParseOptions parseOptions = ConfigParseOptions.defaults().setAllowMissing(false);
|
||||||
Config defaultConfig = ConfigFactory.parseResources("corda-reference.conf", parseOptions);
|
Config defaultConfig = ConfigFactory.parseResources("corda-reference.conf", parseOptions);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user