You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by hy...@apache.org on 2020/01/02 10:54:24 UTC
[dubbo] branch master updated: [Dubbo-5468] fix duplicate code in
CacheableRouterFactory (#5565)
This is an automated email from the ASF dual-hosted git repository.
hyunkun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 1529795 [Dubbo-5468] fix duplicate code in CacheableRouterFactory (#5565)
1529795 is described below
commit 15297955404cb13d4bbb41b24dac67804a9661cc
Author: huangdx0726 <lo...@foxmail.com>
AuthorDate: Thu Jan 2 18:54:13 2020 +0800
[Dubbo-5468] fix duplicate code in CacheableRouterFactory (#5565)
---
.../main/java/org/apache/dubbo/rpc/cluster/CacheableRouterFactory.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/CacheableRouterFactory.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/CacheableRouterFactory.java
index 67b3d41..4d4b9eb 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/CacheableRouterFactory.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/CacheableRouterFactory.java
@@ -30,8 +30,7 @@ public abstract class CacheableRouterFactory implements RouterFactory {
@Override
public Router getRouter(URL url) {
- routerMap.computeIfAbsent(url.getServiceKey(), k -> createRouter(url));
- return routerMap.get(url.getServiceKey());
+ return routerMap.computeIfAbsent(url.getServiceKey(), k -> createRouter(url));
}
protected abstract Router createRouter(URL url);