abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckopp...@apache.org
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 GMT
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]");



Mime
View raw message