Skip to content

Commit

Permalink
Check before use to avoid possible NPE in MetadataInfo (#9420)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangchengming666 authored Dec 16, 2021
1 parent 9cfb1ae commit c0b7f95
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@ public String getMethodParameter(String method, String key, String defaultValue)
}

private String getMethodParameter(String method, String key, Map<String, Map<String, String>> map) {
Map<String, String> keyMap = map.get(method);
Map<String, String> keyMap = null;
if (CollectionUtils.isNotEmptyMap(map)) {
keyMap = map.get(method);
}
String value = null;
if (keyMap != null) {
value = keyMap.get(key);
Expand Down

0 comments on commit c0b7f95

Please sign in to comment.