kylixs commented on a change in pull request #8455: URL: https://github.com/apache/dubbo/pull/8455#discussion_r686549541
########## File path: dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ConsumerModel.java ########## @@ -64,7 +66,20 @@ public ConsumerModel(String serviceKey this.referenceConfig = referenceConfig; } - public void init(Map<String, AsyncMethodInfo> attributes) { + + public void initMethodModels(List<MethodConfig> methodConfigs) { + + Map<String, AsyncMethodInfo> attributes = null; + if (CollectionUtils.isNotEmpty(methodConfigs)) { + attributes = new HashMap<>(16); + for (MethodConfig methodConfig : methodConfigs) { + AsyncMethodInfo asyncMethodInfo = methodConfig.convertMethodConfig2AsyncInfo(); Review comment: There are still some problems: * `ConsumerMethodModel` and `AsyncMethodInfo` are not the same things, the method naming is not very appropriate `initMethodModels(List<MethodConfig> methodConfigs)`, the origin method name is `init()`, it's means do some initialization, may include other attributes later. * `List<MethodConfig> methodConfigs` can be obtained by `ReferenceConfig.getMethods()`. In fact, it does not need to be passed in by parameters. -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org