[hibernate-issues] [Hibernate-JIRA] Updated: (HV-14) Minor typo in regular expression in class EmailValidator

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri May 23 18:20:33 EDT 2008


     [ http://opensource.atlassian.com/projects/hibernate/browse/HV-14?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard updated HV-14:
-------------------------------

    Fix Version/s: 3.1.0.CR1

> Minor typo in regular expression in class EmailValidator
> --------------------------------------------------------
>
>                 Key: HV-14
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-14
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: validators
>    Affects Versions: 3.0.0.ga
>            Reporter: Talal Al-Tamimi
>            Assignee: Diego Plentz
>            Priority: Trivial
>             Fix For: 3.0.1, 3.1.0.CR1
>
>
> It looks like there is a small mistake in the regular expression below from class EmailValidator:
> private static String ATOM = "[^\\x00-\\x1F^\\(^\\)^\\<^\\>^\\@^\\,^\\(;^\\:^\\\\^\\\"^\\.^\\[^\\]^\\s]";
> The substring to exclude a semicolon should be "^\\;" but above it is shown as "^\\(;"
> Instead of excluding a semicolon, this will exclude the left parenthesis (which is already done earlier in the regular expression) and allow a semicolon.
> Also, the initialize method is instantiating instance variable 'pattern' twice. The first seems to be an older line of code, so it might be a good idea to comment it out. This is not a bug though, since the first instance is just discarded.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list