Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 41040 invoked from network); 13 Nov 2008 01:07:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2008 01:07:42 -0000 Received: (qmail 18271 invoked by uid 500); 13 Nov 2008 01:07:49 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 18226 invoked by uid 500); 13 Nov 2008 01:07:49 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 18217 invoked by uid 99); 13 Nov 2008 01:07:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2008 17:07:49 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Thu, 13 Nov 2008 01:06:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 70FD2238889C; Wed, 12 Nov 2008 17:07:21 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r713597 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertificateHostnameVerifier.java Date: Thu, 13 Nov 2008 01:07:21 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081113010721.70FD2238889C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Wed Nov 12 17:07:20 2008 New Revision: 713597 URL: http://svn.apache.org/viewvc?rev=713597&view=rev Log: fix pmd error (not sure why pmd isn't running in eclipse for me right now) Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertificateHostnameVerifier.java Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertificateHostnameVerifier.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertificateHostnameVerifier.java?rev=713597&r1=713596&r2=713597&view=diff ============================================================================== --- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertificateHostnameVerifier.java (original) +++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/https/CertificateHostnameVerifier.java Wed Nov 12 17:07:20 2008 @@ -455,15 +455,14 @@ public static boolean acceptableCountryWildcard(final String cn) { int cnLen = cn.length(); - if (cnLen >= 7 && cnLen <= 9) { + if (cnLen >= 7 && cnLen <= 9 // Look for the '.' in the 3rd-last position: - if (cn.charAt(cnLen - 3) == '.') { - // Trim off the [*.] and the [.XX]. - String s = cn.substring(2, cnLen - 3); - // And test against the sorted array of bad 2lds: - int x = Arrays.binarySearch(BAD_COUNTRY_2LDS, s); - return x < 0; - } + && cn.charAt(cnLen - 3) == '.') { + // Trim off the [*.] and the [.XX]. + String s = cn.substring(2, cnLen - 3); + // And test against the sorted array of bad 2lds: + int x = Arrays.binarySearch(BAD_COUNTRY_2LDS, s); + return x < 0; } return true; }