Skip to content

Commit

Permalink
(Fix) Fix NPE when getting map params (apache#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
murong00 authored Jan 5, 2024
1 parent d49eda9 commit f92a0f0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private static void syncDatabase(

private static Map<String, String> getConfigMap(MultipleParameterTool params, String key) {
if (!params.has(key)) {
return null;
return new HashMap<>();
}

Map<String, String> map = new HashMap<>();
Expand All @@ -163,7 +163,6 @@ private static Map<String, String> getConfigMap(MultipleParameterTool params, St
}

System.err.println("Invalid " + key + " " + param + ".\n");
return null;
}
return map;
}
Expand Down

0 comments on commit f92a0f0

Please sign in to comment.