Skip to content

Commit

Permalink
Fix syntax error caused by old JDK?
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhniebergall committed Oct 14, 2024
1 parent db8f016 commit 3430c54
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public Settings getContentAsSettings() {
if (unvalidatedMap.containsKey(SERVICE_SETTINGS)) {
if (unvalidatedMap.get(SERVICE_SETTINGS) instanceof Map<?, ?> tempMap) {
for (Map.Entry<?, ?> entry : (tempMap).entrySet()) {
if (entry.getKey() instanceof String key && entry.getValue() instanceof Object value) {
serviceSettings.put(key, value);
if (entry.getKey() instanceof String key) {
serviceSettings.put(key, entry.getValue());
} else {
throw new ElasticsearchStatusException(
"Failed to parse update request [{}]",
Expand All @@ -154,8 +154,8 @@ public Settings getContentAsSettings() {
if (unvalidatedMap.containsKey(TASK_SETTINGS)) {
if (unvalidatedMap.get(TASK_SETTINGS) instanceof Map<?, ?> tempMap) {
for (Map.Entry<?, ?> entry : (tempMap).entrySet()) {
if (entry.getKey() instanceof String key && entry.getValue() instanceof Object value) {
taskSettings.put(key, value);
if (entry.getKey() instanceof String key) {
taskSettings.put(key, entry.getValue());
} else {
throw new ElasticsearchStatusException(
"Failed to parse update request [{}]",
Expand Down

0 comments on commit 3430c54

Please sign in to comment.