sebbASF commented on a change in pull request #84:
URL: https://github.com/apache/commons-net/pull/84#discussion_r676496432



##########
File path: src/main/java/org/apache/commons/net/util/SubnetUtils.java
##########
@@ -331,6 +331,33 @@ public SubnetUtils(final String address, final String 
mask) {
         this.broadcast = this.network | ~this.netmask;
     }
 
+    /**
+     * Constructor that takes a CIDR-notation string, e.g. "192.168.0.1/16", a 
dotted decimal mask and and flag to
+     * return value of {@link SubnetInfo#getAddressCount()}
+     * @param cidrNotation A CIDR-notation string, e.g. "192.168.0.1/16"
+     * @param inclusiveHostCount A boolean value e.g. true
+     * @throws IllegalArgumentException if the parameter is invalid,
+     * i.e. does not match n.n.n.n/m where n=1-3 decimal digits, m = 1-2 
decimal digits in range 0-32
+     */
+    public SubnetUtils(final String cidrNotation, final boolean 
inclusiveHostCount) {

Review comment:
       Agreed. 
   
   It would have been better to add these variants instead of creating the 
setter, but that is done now, and it's not possible to make the class final now 
without breaking the API.




-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to