fix NPE
This commit is contained in:
parent
eb596d7270
commit
42ebfe7bdb
|
@ -242,7 +242,7 @@ final class Bootstrap {
|
|||
return keystore;
|
||||
}
|
||||
|
||||
private static Environment initialEnvironment(boolean foreground, Path pidFile,
|
||||
private static Environment createEnvironment(boolean foreground, Path pidFile,
|
||||
KeyStoreWrapper keystore, Settings initialSettings) {
|
||||
Terminal terminal = foreground ? Terminal.DEFAULT : null;
|
||||
Settings.Builder builder = Settings.builder();
|
||||
|
@ -250,7 +250,9 @@ final class Bootstrap {
|
|||
builder.put(Environment.PIDFILE_SETTING.getKey(), pidFile);
|
||||
}
|
||||
builder.put(initialSettings);
|
||||
if (keystore != null) {
|
||||
builder.setKeyStore(keystore);
|
||||
}
|
||||
return InternalSettingsPreparer.prepareEnvironment(builder.build(), terminal, Collections.emptyMap());
|
||||
}
|
||||
|
||||
|
@ -292,7 +294,7 @@ final class Bootstrap {
|
|||
INSTANCE = new Bootstrap();
|
||||
|
||||
final KeyStoreWrapper keystore = loadKeyStore(initialEnv);
|
||||
Environment environment = initialEnvironment(foreground, pidFile, keystore, initialEnv.settings());
|
||||
Environment environment = createEnvironment(foreground, pidFile, keystore, initialEnv.settings());
|
||||
try {
|
||||
LogConfigurator.configure(environment);
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue