AMashenkov commented on a change in pull request #9024:
URL: https://github.com/apache/ignite/pull/9024#discussion_r617729070



##########
File path: 
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/TcpDiscoveryIpFinderAdapter.java
##########
@@ -71,6 +79,24 @@
         return shared;
     }
 
+    /** {@inheritDoc} */
+    @Override public boolean isIpAddressAllowed(String ipAddress) {
+
+        if (regexList == null) {
+            return true;
+        }
+
+        for (Pattern pattern : regexList) {
+            Matcher matcher = pattern.matcher(ipAddress);
+
+            if (matcher.matches()) {
+                return false;
+            }

Review comment:
       ```suggestion
               if (matcher.matches())
                   return false;
   ```

##########
File path: 
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/TcpDiscoveryIpFinderAdapter.java
##########
@@ -71,6 +79,24 @@
         return shared;
     }
 
+    /** {@inheritDoc} */
+    @Override public boolean isIpAddressAllowed(String ipAddress) {
+
+        if (regexList == null) {
+            return true;
+        }

Review comment:
       ```suggestion
           if (regexList == null)
               return true;
   ```

##########
File path: 
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/TcpDiscoveryIpFinderAdapter.java
##########
@@ -85,6 +111,21 @@ public TcpDiscoveryIpFinderAdapter setShared(boolean 
shared) {
         return this;
     }
 
+    /**
+     * Adds a regex for filtering IPs

Review comment:
       ```suggestion
        * Adds a regex for filtering IPs.
        *
        * @param regex Regular expression.
        * @return {@code this} for chaining.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to