commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1715437 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
Date Fri, 20 Nov 2015 22:30:09 GMT
Author: sebb
Date: Fri Nov 20 22:30:09 2015
New Revision: 1715437

URL: http://svn.apache.org/viewvc?rev=1715437&view=rev
Log:
Don't assume that there are 4 groups; check all the groups that were returned

Modified:
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java?rev=1715437&r1=1715436&r2=1715437&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
Fri Nov 20 22:30:09 2015
@@ -92,8 +92,7 @@ public class InetAddressValidator implem
         }
 
         // verify that address subgroups are legal
-        for (int i = 0; i <= 3; i++) {
-            String ipSegment = groups[i];
+        for (String ipSegment : groups) {
             if (ipSegment == null || ipSegment.length() == 0) {
                 return false;
             }



Mime
View raw message