Gracefully handle null in checkSettingsForTerminalDeprecation

Fixes a test failure after backport to 7.x
This commit is contained in:
Yannick Welsch 2020-08-12 18:03:52 +02:00
parent 14e1618fd9
commit 8c488de576
1 changed files with 10 additions and 7 deletions

View File

@ -116,7 +116,9 @@ public class InternalSettingsPreparer {
// This method to be removed in 8.0.0, as it was deprecated in 6.0 and removed in 7.0
assert Version.CURRENT.major != 8: "Logic pertaining to config driven prompting should be removed";
for (String setting : output.keys()) {
switch (output.get(setting)) {
final String value = output.get(setting);
if (value != null) {
switch (value) {
case SECRET_PROMPT_VALUE:
throw new SettingsException("Config driven secret prompting was deprecated in 6.0.0. Use the keystore" +
" for secure settings.");
@ -126,6 +128,7 @@ public class InternalSettingsPreparer {
}
}
}
}
/**
* Finish preparing settings by replacing forced settings and any defaults that need to be added.