Skip to content

Commit

Permalink
Create a copy
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Dec 5, 2024
1 parent 5e2ae80 commit cacff09
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,9 @@ public Builder extectedNodeStartupCount(int expectedNodeStartupCount) {
}

public Builder nodeSettings(Map<String, Object> settings) {
settings.put("monitor.fs.health.enabled", false);
settings.forEach((key, value) -> {
HashMap<String, Object> settingsCopy = new HashMap<>(settings);
settingsCopy.put("monitor.fs.health.enabled", false);
settingsCopy.forEach((key, value) -> {
if (value instanceof List) {
List<String> values = ((List<?>) value).stream().map(String::valueOf).collect(Collectors.toList());
nodeOverrideSettingsBuilder.putList(key, values);
Expand Down

0 comments on commit cacff09

Please sign in to comment.