]
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: