commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (VALIDATOR-203) Refactor UrlValidator - especially the line 370-ish TODO.
Date Fri, 02 Nov 2007 13:48:51 GMT

     [ https://issues.apache.org/jira/browse/VALIDATOR-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Niall Pemberton updated VALIDATOR-203:
--------------------------------------

    Assignee: Ben Speakmon  (was: Henri Yandell)

Thanks for doing this Ben, same comment as per Email valdiator

IMO it should improve performance if the regular expressions are not compiled for each URL
validated. The JavaDoc for java.util.regex.Pattern[1] indicates that patterns are thread safe
- so would be better to just compile the regular expression once:

"All of the state involved in performing a match resides in the matcher, so many matchers
can share the same pattern."
[1] http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html

> Refactor UrlValidator - especially the line 370-ish TODO.
> ---------------------------------------------------------
>
>                 Key: VALIDATOR-203
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-203
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Routines
>            Reporter: Henri Yandell
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> The UrlValidator class needs some cleanup. Just looking at VALIDATOR-202 there were some
obvious places where things could be cleaned up and the solution for VALIDATOR-202 could use
improvement.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message