Skip to content

Commit

Permalink
Simply TagRouter (#2924)
Browse files Browse the repository at this point in the history
  • Loading branch information
kexianjun authored and ralf0131 committed Dec 10, 2018
1 parent 6990134 commit 3a05378
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,10 @@ public <T> List<Invoker<T>> route(List<Invoker<T>> invokers, URL url, Invocation
result.add(invoker);
}
}
// If no invoker be selected, downgrade to normal invokers
if (result.isEmpty()) {
for (Invoker<T> invoker : invokers) {
if (StringUtils.isEmpty(invoker.getUrl().getParameter(Constants.TAG_KEY))) {
result.add(invoker);
}
}
}
// Normal request
} else {
}
// If Constants.REQUEST_TAG_KEY unspecified or no invoker be selected, downgrade to normal invokers
if (result.isEmpty()) {
for (Invoker<T> invoker : invokers) {
// Can't access tag invoker,only normal invoker should be selected
if (StringUtils.isEmpty(invoker.getUrl().getParameter(Constants.TAG_KEY))) {
result.add(invoker);
}
Expand Down

0 comments on commit 3a05378

Please sign in to comment.