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 7447f33 fix NPE when check=false is set and provider is empty. (#6376) 7447f33 is described below commit 7447f3372d960ce9d73331ad6c16d34448853b51 Author: ken.lj <ken.lj...@gmail.com> AuthorDate: Sun Jun 28 22:18:03 2020 +0800 fix NPE when check=false is set and provider is empty. (#6376) fixes #6228 --- .../src/main/java/org/apache/dubbo/rpc/model/ConsumerModel.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 9dca2e8..e49888d 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 @@ -138,7 +138,12 @@ public class ConsumerModel { } public void initMethodModels() { - Class[] interfaceList = serviceMetadata.getTarget().getClass().getInterfaces(); + Class[] interfaceList = null; + if (proxyObject == null) { + interfaceList = new Class[]{referenceConfig.getActualInterface()}; + } else { + interfaceList = proxyObject.getClass().getInterfaces(); + } for (Class interfaceClass : interfaceList) { for (Method method : interfaceClass.getMethods()) { methodModels.put(method, new ConsumerMethodModel(method));