commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1654731 - in /commons/proper/validator/trunk/src: changes/ main/java/org/apache/commons/validator/routines/ test/java/org/apache/commons/validator/routines/
Date Mon, 26 Jan 2015 07:27:23 GMT
Author: britter
Date: Mon Jan 26 07:27:22 2015
New Revision: 1654731

URL: http://svn.apache.org/r1654731
Log:
Revert fix for VALIDATOR-358 after veto on dev ML

Modified:
    commons/proper/validator/trunk/src/changes/changes.xml
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
    commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
    commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/UrlValidatorTest.java

Modified: commons/proper/validator/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/changes/changes.xml?rev=1654731&r1=1654730&r2=1654731&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/changes/changes.xml (original)
+++ commons/proper/validator/trunk/src/changes/changes.xml Mon Jan 26 07:27:22 2015
@@ -43,9 +43,6 @@ The <action> type attribute can be add,u
   <body>
 
   <release version="1.5.0" date="tba" description="tba">
-    <action issue="VALIDATOR-356" dev="britter" type="fix" due-to="Nykolas Laurentino
de Lima">
-      Underscores in domain names are not supported
-    </action>
     <action issue="VALIDATOR-356" dev="seb" type="fix" >
       IDN.toASCII drops trailing dot in Java 6 & 7
     </action>

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/DomainValidator.java?rev=1654731&r1=1654730&r2=1654731&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
Mon Jan 26 07:27:22 2015
@@ -69,7 +69,7 @@ public class DomainValidator implements
 
     // RFC2396: domainlabel   = alphanum | alphanum *( alphanum | "-" ) alphanum
     // Max 63 characters
-    private static final String DOMAIN_LABEL_REGEX = "\\p{Alnum}(?>[\\p{Alnum}-_]{0,61}\\p{Alnum})?";
+    private static final String DOMAIN_LABEL_REGEX = "\\p{Alnum}(?>[\\p{Alnum}-]{0,61}\\p{Alnum})?";
 
     // RFC2396 toplabel = alpha | alpha *( alphanum | "-" ) alphanum
     // Max 63 characters

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java?rev=1654731&r1=1654730&r2=1654731&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
Mon Jan 26 07:27:22 2015
@@ -133,7 +133,7 @@ public class UrlValidator implements Ser
     // Drop numeric, and  "+-." for now
     // TODO does not allow for optional userinfo. 
     // Validation of character set is done by isValidAuthority
-    private static final String AUTHORITY_CHARS_REGEX = "\\p{Alnum}\\-\\._";
+    private static final String AUTHORITY_CHARS_REGEX = "\\p{Alnum}\\-\\.";
 
     private static final String AUTHORITY_REGEX =
             "^([" + AUTHORITY_CHARS_REGEX + "]*)(:\\d*)?(.*)?";

Modified: commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java?rev=1654731&r1=1654730&r2=1654731&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
(original)
+++ commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java
Mon Jan 26 07:27:22 2015
@@ -468,6 +468,6 @@ public class EmailValidatorTest extends
         assertTrue(validator.isValid("abc_@abc.com"));
         assertTrue(validator.isValid("abc-def@abc.com"));
         assertTrue(validator.isValid("abc_def@abc.com"));
-        assertTrue(validator.isValid("abc@abc_def.com"));
+        assertFalse(validator.isValid("abc@abc_def.com"));
     }
 }

Modified: commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/UrlValidatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/UrlValidatorTest.java?rev=1654731&r1=1654730&r2=1654731&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/UrlValidatorTest.java
(original)
+++ commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/UrlValidatorTest.java
Mon Jan 26 07:27:22 2015
@@ -441,7 +441,6 @@ public class UrlValidatorTest extends Te
                                new ResultPair("", true)};
 
    ResultPair[] testUrlAuthority = {new ResultPair("www.google.com", true),
-		   						  new ResultPair("my_domain.s3.amazonaws.com", true),
                                   new ResultPair("go.com", true),
                                   new ResultPair("go.au", true),
                                   new ResultPair("0.0.0.0", true),



Mime
View raw message