fix method name typo: convertMethodConfig2AsyncInfo

This commit is contained in:
ken.lj 2019-10-10 08:45:41 +08:00
parent e88242c0be
commit ac7057de36
3 changed files with 3 additions and 4 deletions

View File

@ -112,7 +112,7 @@ public class MethodConfigTest {
methodConfig.setOninvokeMethod("setName");
methodConfig.setOninvoke(new Person());
ConsumerModel.AsyncMethodInfo methodInfo = org.apache.dubbo.config.MethodConfig.convertMethodConfig2AyncInfo(methodConfig);
ConsumerModel.AsyncMethodInfo methodInfo = org.apache.dubbo.config.MethodConfig.convertMethodConfig2AsyncInfo(methodConfig);
assertEquals(methodInfo.getOninvokeMethod(), Person.class.getMethod("setName", String.class));
}

View File

@ -248,7 +248,7 @@ public abstract class AbstractConfig implements Serializable {
}
}
protected static ConsumerModel.AsyncMethodInfo convertMethodConfig2AyncInfo(MethodConfig methodConfig) {
protected static ConsumerModel.AsyncMethodInfo convertMethodConfig2AsyncInfo(MethodConfig methodConfig) {
if (methodConfig == null || (methodConfig.getOninvoke() == null && methodConfig.getOnreturn() == null && methodConfig.getOnthrow() == null)) {
return null;
}

View File

@ -38,7 +38,6 @@ import org.apache.dubbo.rpc.cluster.directory.StaticDirectory;
import org.apache.dubbo.rpc.cluster.support.ClusterUtils;
import org.apache.dubbo.rpc.cluster.support.RegistryAwareCluster;
import org.apache.dubbo.rpc.model.ApplicationModel;
import org.apache.dubbo.rpc.model.ConsumerMethodModel;
import org.apache.dubbo.rpc.model.ConsumerModel;
import org.apache.dubbo.rpc.model.ServiceMetadata;
import org.apache.dubbo.rpc.model.ServiceModel;
@ -338,7 +337,7 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
map.put(methodConfig.getName() + ".retries", "0");
}
}
ConsumerMethodModel.AsyncMethodInfo asyncMethodInfo = convertMethodConfig2AsyncInfo(methodConfig);
ConsumerModel.AsyncMethodInfo asyncMethodInfo = convertMethodConfig2AsyncInfo(methodConfig);
if (asyncMethodInfo != null) {
// consumerModel.getMethodModel(methodConfig.getName()).addAttribute(ASYNC_KEY, asyncMethodInfo);
attributes.put(methodConfig.getName(), asyncMethodInfo);