Skip to content

Commit

Permalink
Merge pull request apache#2434, Remove method.async of provider url.
Browse files Browse the repository at this point in the history
  • Loading branch information
carryxyh authored and chickenlj committed Sep 19, 2018
1 parent 7ad0b84 commit 9135546
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
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 {

Expand Down Expand Up @@ -63,6 +64,17 @@ public static URL mergeUrl(URL remoteUrl, Map<String, String> localMap) {

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

0 comments on commit 9135546

Please sign in to comment.