You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2014/12/31 01:15:53 UTC
svn commit: r1648633 -
/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
Author: sebb
Date: Wed Dec 31 00:15:52 2014
New Revision: 1648633
URL: http://svn.apache.org/r1648633
Log:
VALIDATOR-342 URLValidator returns false for http://example.rocks
Add a note that the code checks the domain
Modified:
commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
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=1648633&r1=1648632&r2=1648633&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 Wed Dec 31 00:15:52 2014
@@ -273,6 +273,9 @@ public class UrlValidator implements Ser
/**
* <p>Checks if a field has a valid url address.</p>
*
+ * Note that the method calls #isValidAuthority()
+ * which checks that the domain is valid.
+ *
* @param value The value validation is being performed on. A <code>null</code>
* value is considered invalid.
* @return true if the url is valid.
@@ -349,6 +352,7 @@ public class UrlValidator implements Ser
/**
* Returns true if the authority is properly formatted. An authority is the combination
* of hostname and port. A <code>null</code> authority value is considered invalid.
+ * Note: this implementation validates the domain.
* @param authority Authority value to validate.
* @return true if authority (hostname and port) is valid.
*/