commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1785349 - /commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java
Date Fri, 03 Mar 2017 16:47:38 GMT
Author: sebb
Date: Fri Mar  3 16:47:38 2017
New Revision: 1785349

URL: http://svn.apache.org/viewvc?rev=1785349&view=rev
Log:
Bit count cannot be more than 2 digits (32)

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java?rev=1785349&r1=1785348&r2=1785349&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java Fri
Mar  3 16:47:38 2017
@@ -27,7 +27,7 @@ import java.util.regex.Pattern;
 public class SubnetUtils {
 
     private static final String IP_ADDRESS = "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})";
-    private static final String SLASH_FORMAT = IP_ADDRESS + "/(\\d{1,3})";
+    private static final String SLASH_FORMAT = IP_ADDRESS + "/(\\d{1,2})"; // 0 -> 32
     private static final Pattern addressPattern = Pattern.compile(IP_ADDRESS);
     private static final Pattern cidrPattern = Pattern.compile(SLASH_FORMAT);
     private static final int NBITS = 32;



Mime
View raw message