You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by cr...@apache.org on 2022/05/18 09:15:42 UTC
[dubbo] branch 3.0 updated: fix destroy reference cause NPE (#10050)
This is an automated email from the ASF dual-hosted git repository.
crazyhzm 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 a57394a85c fix destroy reference cause NPE (#10050)
a57394a85c is described below
commit a57394a85c90b450393755646e6467020f45de90
Author: huazhongming <cr...@gmail.com>
AuthorDate: Wed May 18 17:15:35 2022 +0800
fix destroy reference cause NPE (#10050)
Signed-off-by: crazyhzm <cr...@gmail.com>
---
.../main/java/org/apache/dubbo/config/utils/SimpleReferenceCache.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/SimpleReferenceCache.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/SimpleReferenceCache.java
index 34aae97d1a..f97bf1655e 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/SimpleReferenceCache.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/SimpleReferenceCache.java
@@ -260,7 +260,9 @@ public class SimpleReferenceCache implements ReferenceCache {
private void destroyReference(ReferenceConfigBase<?> rc) {
Destroyable proxy = (Destroyable) rc.get();
- proxy.$destroy();
+ if (proxy != null){
+ proxy.$destroy();
+ }
rc.destroy();
}