From 15b78b9626cf1eb0fae1389440e1ce567761d2d7 Mon Sep 17 00:00:00 2001 From: tswstarplanet Date: Thu, 2 May 2019 21:50:59 +0800 Subject: [PATCH] sort added router list before set the 'routers' field of the RouterChain --- .../src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java index a690d73f1c9..5a32bbd139f 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java @@ -79,7 +79,7 @@ public void addRouters(List routers) { List newRouters = new CopyOnWriteArrayList<>(); newRouters.addAll(builtinRouters); newRouters.addAll(routers); - CollectionUtils.sort(routers); + CollectionUtils.sort(newRouters); this.routers = newRouters; }