commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bspeak...@apache.org
Subject svn commit: r590563 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
Date Wed, 31 Oct 2007 05:34:01 GMT
Author: bspeakmon
Date: Tue Oct 30 22:34:00 2007
New Revision: 590563

URL: http://svn.apache.org/viewvc?rev=590563&view=rev
Log:
- VALIDATOR-191: incrementally replace oro with java.util.regex

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=590563&r1=590562&r2=590563&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
Tue Oct 30 22:34:00 2007
@@ -143,7 +143,7 @@
 
     private static final String PATH_PATTERN = "/^(/[-\\w:@&?=+,.!/~*'%$_;]*)?$/";
 
-    private static final String QUERY_PATTERN = "/^(.*)$/";
+    private static final String QUERY_PATTERN = "^(.*)$";
 
     private static final String LEGAL_ASCII_PATTERN = "^\\p{ASCII}+$";
 
@@ -391,8 +391,7 @@
             return true;
         }
 
-        Perl5Util queryMatcher = new Perl5Util();
-        return queryMatcher.match(QUERY_PATTERN, query);
+        return Pattern.matches(QUERY_PATTERN, query);
     }
 
     /**



Mime
View raw message