You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/06/21 02:13:10 UTC

[GitHub] [dubbo] AlbumenJ commented on a change in pull request #8065: Fix the issue that the ReferenceConfigCache#destroy method does not call proxy.$destroy()

AlbumenJ commented on a change in pull request #8065:
URL: https://github.com/apache/dubbo/pull/8065#discussion_r655032423



##########
File path: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ReferenceConfigCache.java
##########
@@ -175,7 +175,8 @@ public void destroy(String key, Class<?> type) {
 
         Map<String, Object> proxiesOftype = proxies.get(type);
         if (CollectionUtils.isNotEmptyMap(proxiesOftype)) {
-            proxiesOftype.remove(key);
+            Destroyable proxy = (Destroyable) proxiesOftype.remove(key);

Review comment:
       it would be better to check if the object is an instance of Destroyable first




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org