hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1445026 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java
Date Tue, 12 Feb 2013 03:23:52 GMT
Author: sebb
Date: Tue Feb 12 03:23:52 2013
New Revision: 1445026

URL: http://svn.apache.org/r1445026
Log:
Show repeated string in compressed pattern

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java?rev=1445026&r1=1445025&r2=1445026&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/util/InetAddressUtils.java
Tue Feb 12 03:23:52 2013
@@ -58,7 +58,9 @@ public class InetAddressUtils {
 
     private static final Pattern IPV6_HEX_COMPRESSED_PATTERN =
         Pattern.compile(
-                "^(([0-9A-Fa-f]{1,4}(:[0-9A-Fa-f]{1,4}){0,5})?)::(([0-9A-Fa-f]{1,4}(:[0-9A-Fa-f]{1,4}){0,5})?)$");
+                "^(([0-9A-Fa-f]{1,4}(:[0-9A-Fa-f]{1,4}){0,5})?)" + // 0-6 hex fields
+                 "::" +
+                 "(([0-9A-Fa-f]{1,4}(:[0-9A-Fa-f]{1,4}){0,5})?)$"); // 0-6 hex fields
 
     public static boolean isIPv4Address(final String input) {
         return IPV4_PATTERN.matcher(input).matches();



Mime
View raw message