Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 918EDEFE6 for ; Tue, 12 Feb 2013 03:24:16 +0000 (UTC) Received: (qmail 30216 invoked by uid 500); 12 Feb 2013 03:24:16 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 30092 invoked by uid 500); 12 Feb 2013 03:24:14 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 30077 invoked by uid 99); 12 Feb 2013 03:24:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 03:24:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 03:24:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5BD7323888D2 for ; Tue, 12 Feb 2013 03:23:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@hc.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130212032352.5BD7323888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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();