Skip to content

Commit

Permalink
fix NPE when check=false is set and provider is empty. (#6376)
Browse files Browse the repository at this point in the history
fixes #6228
  • Loading branch information
chickenlj authored Jun 28, 2020
1 parent 6478ac9 commit 7447f33
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ public void setServiceKey(String serviceKey) {
}

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));
Expand Down

0 comments on commit 7447f33

Please sign in to comment.