Return-Path: X-Original-To: apmail-abdera-commits-archive@www.apache.org Delivered-To: apmail-abdera-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 AB16DD0E9 for ; Fri, 9 Nov 2012 08:34:28 +0000 (UTC) Received: (qmail 35168 invoked by uid 500); 9 Nov 2012 08:34:27 -0000 Delivered-To: apmail-abdera-commits-archive@abdera.apache.org Received: (qmail 35020 invoked by uid 500); 9 Nov 2012 08:34:22 -0000 Mailing-List: contact commits-help@abdera.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@abdera.apache.org Delivered-To: mailing list commits@abdera.apache.org Received: (qmail 34956 invoked by uid 99); 9 Nov 2012 08:34:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2012 08:34:20 +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; Fri, 09 Nov 2012 08:34:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 88A622388993 for ; Fri, 9 Nov 2012 08:33:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1407379 - in /abdera/java/trunk/dependencies/i18n/src: main/java/org/apache/abdera/i18n/text/CharUtils.java test/java/org/apache/abdera/i18n/test/iri/TestIRI.java Date: Fri, 09 Nov 2012 08:33:59 -0000 To: commits@abdera.apache.org From: ckoppelt@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121109083359.88A622388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ckoppelt Date: Fri Nov 9 08:33:58 2012 New Revision: 1407379 URL: http://svn.apache.org/viewvc?rev=1407379&view=rev Log: fix for ABDERA-309 Modified: abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/text/CharUtils.java abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java Modified: abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/text/CharUtils.java URL: http://svn.apache.org/viewvc/abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/text/CharUtils.java?rev=1407379&r1=1407378&r2=1407379&view=diff ============================================================================== --- abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/text/CharUtils.java (original) +++ abdera/java/trunk/dependencies/i18n/src/main/java/org/apache/abdera/i18n/text/CharUtils.java Fri Nov 9 08:33:58 2012 @@ -583,9 +583,11 @@ public final class CharUtils { } }), STD3ASCIIRULES(new Filter() { public boolean accept(int codepoint) { - return !CharUtils.inRange(codepoint, 0x0000, 0x002C) && !CharUtils.inRange(codepoint, 0x002E, 0x002F) + return !CharUtils.inRange(codepoint, 0x0000, 0x002C) + && !CharUtils.inRange(codepoint, 0x002E, 0x002F) && !CharUtils.inRange(codepoint, 0x003A, 0x0040) - && !CharUtils.inRange(codepoint, 0x005B, 0x0060) + && !CharUtils.inRange(codepoint, 0x005B, 0x005E) + && !CharUtils.inRange(codepoint, 0x0060, 0x0060) && !CharUtils.inRange(codepoint, 0x007B, 0x007F); } }); Modified: abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java URL: http://svn.apache.org/viewvc/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java?rev=1407379&r1=1407378&r2=1407379&view=diff ============================================================================== --- abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java (original) +++ abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestIRI.java Fri Nov 9 08:33:58 2012 @@ -50,6 +50,12 @@ public class TestIRI extends TestBase { assertEquals("http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]", iri.toURI().toString()); } + @Test + public void testUnderscore() throws URISyntaxException{ + IRI iri = new IRI("http://its_gbsc.cn.ibm.com/"); + assertEquals("http://its_gbsc.cn.ibm.com/", iri.toURI().toString()); + } + @Test(expected=URISyntaxException.class) public void testIpv6Invalid() throws URISyntaxException{ IRI iri = new IRI("http://[2001:0db8:85a3:08d3:1319:8a2e:0370:734o]");