This is an automated email from the ASF dual-hosted git repository.

tswstarplanet 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 1bcd921  [Dubbo-4716] Fix judgment ipv4 address (#4729)
1bcd921 is described below

commit 1bcd9217376d28650a60080efb9ce7eab849740f
Author: windWheel <1817802...@qq.com>
AuthorDate: Wed Aug 7 21:28:23 2019 +0800

    [Dubbo-4716] Fix judgment ipv4 address (#4729)
    
    * Fix judgment ipv4 address
---
 .../java/org/apache/dubbo/registry/multicast/MulticastRegistry.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dubbo-registry/dubbo-registry-multicast/src/main/java/org/apache/dubbo/registry/multicast/MulticastRegistry.java
 
b/dubbo-registry/dubbo-registry-multicast/src/main/java/org/apache/dubbo/registry/multicast/MulticastRegistry.java
index 0c28445..01d8801 100644
--- 
a/dubbo-registry/dubbo-registry-multicast/src/main/java/org/apache/dubbo/registry/multicast/MulticastRegistry.java
+++ 
b/dubbo-registry/dubbo-registry-multicast/src/main/java/org/apache/dubbo/registry/multicast/MulticastRegistry.java
@@ -150,7 +150,7 @@ public class MulticastRegistry extends FailbackRegistry {
     private void checkMulticastAddress(InetAddress multicastAddress) {
         if (!multicastAddress.isMulticastAddress()) {
             String message = "Invalid multicast address " + multicastAddress;
-            if (!(multicastAddress instanceof Inet4Address)) {
+            if (multicastAddress instanceof Inet4Address) {
                 throw new IllegalArgumentException(message + ", " +
                         "ipv4 multicast address scope: 224.0.0.0 - 
239.255.255.255.");
             } else {

Reply via email to