chickenlj commented on a change in pull request #9420:
URL: https://github.com/apache/dubbo/pull/9420#discussion_r770266020
##########
File path:
dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataInfo.java
##########
@@ -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);
+ }
Review comment:
This check can avoid NPE from happing by checking before use, however, I
don't think it can resolve the root `methodParams` initialization issue as it
has a race condition that needs to be resolved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]