nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] mtien-apache commented on a change in pull request #3932: NIFI-6336 Added code to catch port value when it is 0.
Date Mon, 16 Dec 2019 20:59:57 GMT
mtien-apache commented on a change in pull request #3932: NIFI-6336 Added code to catch port
value when it is 0.
URL: https://github.com/apache/nifi/pull/3932#discussion_r358461459
 
 

 ##########
 File path: nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
 ##########
 @@ -743,6 +743,9 @@ public InetSocketAddress getClusterNodeProtocolAddress() {
                 socketAddress = "localhost";
             }
             int socketPort = getClusterNodeProtocolPort();
+            if (socketPort == 0) {
+                throw new RuntimeException("Load balance port cannot be 0. Port must be inclusively
in the range [1, 65535].");
 
 Review comment:
   @markap14 According to NodeIdentifier.java:204, the method checks if the port is within
range 1-65535. But It seems Java will handle a port 0. So, if there isn't another reason to
disallow it, are we ok to change port configurations to allow port 0?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message