This is an automated email from the ASF dual-hosted git repository.
guohao pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 29becdc Fix npe in zone aware invoker (#9851)
29becdc is described below
commit 29becdc22af9a3e0e9d7367eeed4b65b082c8cd3
Author: GuoHao <[email protected]>
AuthorDate: Tue Mar 29 13:59:18 2022 +0800
Fix npe in zone aware invoker (#9851)
---
.../dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java
index b4bd540..1a40c68 100644
---
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java
+++
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java
@@ -100,7 +100,7 @@ public class ZoneAwareClusterInvoker<T> extends
AbstractClusterInvoker<T> {
// load balance among all registries, with registry weight count in.
Invoker<T> balancedInvoker = select(loadbalance, invocation, invokers,
null);
- if (balancedInvoker.isAvailable()) {
+ if (balancedInvoker!=null && balancedInvoker.isAvailable()) {
return balancedInvoker.invoke(invocation);
}