[dubbo] branch master updated: add back missed logic in ConsumerModel during 3.x merge. (#5539)

2019-12-26 Thread liujun
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
 new 6e4e6b7  add back missed logic in ConsumerModel during 3.x merge. 
(#5539)
6e4e6b7 is described below

commit 6e4e6b769a3b7dc5d6bad801cd394949cdfe1b7b
Author: ken.lj 
AuthorDate: Fri Dec 27 13:32:43 2019 +0800

add back missed logic in ConsumerModel during 3.x merge. (#5539)
---
 .../main/java/org/apache/dubbo/rpc/model/ConsumerModel.java   | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ConsumerModel.java 
b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ConsumerModel.java
index 4bffded..1edb403 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ConsumerModel.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ConsumerModel.java
@@ -66,6 +66,8 @@ public class ConsumerModel {
 if (attributes != null) {
 this.methodConfigs = attributes;
 }
+
+initMethodModels();
 }
 
 /**
@@ -126,9 +128,14 @@ public class ConsumerModel {
 
 this(serviceKey, proxyObject, serviceModel, referenceConfig);
 this.serviceMetadata = metadata;
+}
 
-for (Method method : metadata.getServiceType().getMethods()) {
-methodModels.put(method, new ConsumerMethodModel(method));
+public void initMethodModels() {
+Class[] interfaceList = 
serviceMetadata.getTarget().getClass().getInterfaces();
+for (Class interfaceClass : interfaceList) {
+for (Method method : interfaceClass.getMethods()) {
+methodModels.put(method, new ConsumerMethodModel(method));
+}
 }
 }
 



[dubbo] branch master updated (15ed9f8 -> d02e1fd)

2019-12-26 Thread liujun
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git.


from 15ed9f8  extract duplicate code to a method (#5541)
 add d02e1fd  add finish status for ThreadlessExecutor to support being 
called multiple times. (#5540)

No new revisions were added by this update.

Summary of changes:
 .../dubbo/common/threadpool/ThreadlessExecutor.java  | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)



[dubbo] branch master updated: extract duplicate code to a method (#5541)

2019-12-26 Thread liujun
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
 new 15ed9f8  extract duplicate code to a method (#5541)
15ed9f8 is described below

commit 15ed9f85929a30aaba0b02d23a00d4339f67dad3
Author: zhenxianyimeng <1920405...@qq.com>
AuthorDate: Fri Dec 27 13:27:18 2019 +0800

extract duplicate code to a method (#5541)
---
 .../org/apache/dubbo/rpc/support/RpcUtils.java | 27 +++---
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git 
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java
 
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java
index e1d85b7..7d4a1ab 100644
--- 
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java
+++ 
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java
@@ -57,13 +57,7 @@ public class RpcUtils {
 && !invocation.getMethodName().startsWith("$")) {
 String service = 
invocation.getInvoker().getUrl().getServiceInterface();
 if (StringUtils.isNotEmpty(service)) {
-Class invokerInterface = 
invocation.getInvoker().getInterface();
-Class cls = invokerInterface != null ? 
ReflectUtils.forName(invokerInterface.getClassLoader(), service)
-: ReflectUtils.forName(service);
-Method method = cls.getMethod(invocation.getMethodName(), 
invocation.getParameterTypes());
-if (method.getReturnType() == void.class) {
-return null;
-}
+Method method = getMethodByService(invocation, service);
 return method.getReturnType();
 }
 }
@@ -81,13 +75,7 @@ public class RpcUtils {
 && !invocation.getMethodName().startsWith("$")) {
 String service = 
invocation.getInvoker().getUrl().getServiceInterface();
 if (StringUtils.isNotEmpty(service)) {
-Class invokerInterface = 
invocation.getInvoker().getInterface();
-Class cls = invokerInterface != null ? 
ReflectUtils.forName(invokerInterface.getClassLoader(), service)
-: ReflectUtils.forName(service);
-Method method = cls.getMethod(invocation.getMethodName(), 
invocation.getParameterTypes());
-if (method.getReturnType() == void.class) {
-return null;
-}
+Method method = getMethodByService(invocation, service);
 return ReflectUtils.getReturnTypes(method);
 }
 }
@@ -226,4 +214,15 @@ public class RpcUtils {
 }
 return attachmentsToPass;
 }
+
+private static Method getMethodByService(Invocation invocation, String 
service) throws NoSuchMethodException {
+Class invokerInterface = invocation.getInvoker().getInterface();
+Class cls = invokerInterface != null ? 
ReflectUtils.forName(invokerInterface.getClassLoader(), service)
+: ReflectUtils.forName(service);
+Method method = cls.getMethod(invocation.getMethodName(), 
invocation.getParameterTypes());
+if (method.getReturnType() == void.class) {
+return null;
+}
+return method;
+}
 }



[dubbo-admin] branch develop updated (c69cfe0 -> fdc6567)

2019-12-26 Thread wangxin
This is an automated email from the ASF dual-hosted git repository.

wangxin pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git.


from c69cfe0  provide a simple login module (#521)
 add fdc6567  Bump checkstyle from 8.9 to 8.18 (#556)

No new revisions were added by this update.

Summary of changes:
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)