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/incubator-dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 9135546  Merge pull request #2434, Remove method.async of provider url.
9135546 is described below

commit 9135546c847edb3eb6d8abd3efd46f9ab702bd2e
Author: 时无两丶 <[email protected]>
AuthorDate: Wed Sep 19 12:43:47 2018 +0800

    Merge pull request #2434, Remove method.async of provider url.
    
    Fixes #2321.
---
 .../org/apache/dubbo/rpc/cluster/support/ClusterUtils.java | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ClusterUtils.java
 
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ClusterUtils.java
index 2b87555..2e02c92 100644
--- 
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ClusterUtils.java
+++ 
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ClusterUtils.java
@@ -20,11 +20,12 @@ import org.apache.dubbo.common.Constants;
 import org.apache.dubbo.common.URL;
 
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * ClusterUtils
- *
  */
 public class ClusterUtils {
 
@@ -63,6 +64,17 @@ public class ClusterUtils {
 
             map.remove(Constants.ASYNC_KEY);
             map.remove(Constants.DEFAULT_KEY_PREFIX + Constants.ASYNC_KEY);
+
+            // remove method async entry.
+            Set<String> methodAsyncKey = new HashSet<>();
+            for (String key : map.keySet()) {
+                if (key != null && key.endsWith("." + Constants.ASYNC_KEY)) {
+                    methodAsyncKey.add(key);
+                }
+            }
+            for (String needRemove : methodAsyncKey) {
+                map.remove(needRemove);
+            }
         }
 
         if (localMap != null && localMap.size() > 0) {

Reply via email to