You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2020/11/10 02:58:24 UTC
[dubbo] 02/02: use isNotEmpty
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
commit 69c80f631f474110032f035ddf459eab31e11bad
Author: ken.lj <ke...@gmail.com>
AuthorDate: Tue Nov 10 10:55:09 2020 +0800
use isNotEmpty
---
.../apache/dubbo/registry/client/migration/MigrationRuleHandler.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationRuleHandler.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationRuleHandler.java
index 67c18c4..5badf15 100644
--- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationRuleHandler.java
+++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/migration/MigrationRuleHandler.java
@@ -58,7 +58,7 @@ public class MigrationRuleHandler<T> {
try {
rule = MigrationRule.parse(rawRule);
// FIXME, consumerURL.getHost() might not exactly the ip expected.
- if (CollectionUtils.isEmpty(rule.getTargetIps()) || (rule.getTargetIps() != null && rule.getTargetIps().contains(consumerURL.getHost()))) {
+ if (CollectionUtils.isEmpty(rule.getTargetIps()) || rule.getTargetIps().contains(consumerURL.getHost())) {
setMigrationRule(rule);
step = rule.getStep(consumerURL.getServiceKey());
threshold = rule.getThreshold(consumerURL.getServiceKey());