You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ben Speakmon (JIRA)" <ji...@apache.org> on 2007/10/25 00:12:51 UTC

[jira] Created: (VALIDATOR-242) Move EmailValidator to routines package

Move EmailValidator to routines package
---------------------------------------

                 Key: VALIDATOR-242
                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
             Project: Commons Validator
          Issue Type: Task
          Components: Framework, Routines
    Affects Versions: 1.3.1 Release
            Reporter: Ben Speakmon
            Assignee: Ben Speakmon
             Fix For: 1.4


Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537687 ] 

Ben Speakmon commented on VALIDATOR-242:
----------------------------------------

Ah, thanks for that. Makes much more sense.

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539728 ] 

Ben Speakmon commented on VALIDATOR-242:
----------------------------------------

VALIDATOR-246 created to address the comment issue.

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Resolved: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben Speakmon resolved VALIDATOR-242.
------------------------------------

    Resolution: Fixed

Move completed, tests ready, and refactoring done, so this is done.

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539727 ] 

Ben Speakmon commented on VALIDATOR-242:
----------------------------------------

I'd probably wind up throwing it out and starting over anyway, so getting rid of it now is fine with me. I'll do another issue for its eventual return if someone (not me) really wants to have it in there.

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542466 ] 

Ben Speakmon commented on VALIDATOR-242:
----------------------------------------

I think you need to spell it out for me -- I know we can just delegate to the new EmailValidator in routines, but is it important to preserve compatibility in the protected methods just in case someone subclassed them? Or do we want to just copy and paste the new routines?

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Resolved: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton resolved VALIDATOR-242.
---------------------------------------

    Resolution: Fixed

Sorry it was late and I was skimming through the routines package and noticed a Perl5Util import statement and assumed stripComments() was still in that version (and I didn't remember r591487[1]). Looks like it was just the import statement that was missed - which I've just removed[2]

[1] http://svn.apache.org/viewvc?view=rev&revision=591487
[2] [1] http://svn.apache.org/viewvc?view=rev&revision=594904

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540967 ] 

Niall Pemberton commented on VALIDATOR-242:
-------------------------------------------

Sure :)

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539716 ] 

Niall Pemberton commented on VALIDATOR-242:
-------------------------------------------

I agree stripComments() is a PITA. If you have the time and will to implement it then great, otherwise I suggest we just remove that logic unitl someone comes along with code and tests (perhaps open a separate Jira ticket as a reminder). Until I saw the code in that validator I wasn't even aware that you could comment an email address in that way and I suspect its rarely used. Anyway since this is a new implementation (and the old one will still be available in the next release) then compatibility isn't an issue IMO.

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Reopened: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton reopened VALIDATOR-242:
---------------------------------------


Sorry, re-opening this - still has the Perl5Util dependency

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540933 ] 

Ben Speakmon commented on VALIDATOR-242:
----------------------------------------

Niall, you okay with resolving this now?

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539691 ] 

Ben Speakmon commented on VALIDATOR-242:
----------------------------------------

The stripComments() is going to be hard to deal with. That regexp makes me want to cry -- and it doesn't have any tests either. I suppose the right thing to do is add some dedicated tests for it and then try to untangle the regexp into smaller parts. Pain in the butt :)

As for compiling patterns ahead of time, I agree that it's threadsafe; I held off on it just to minimize the scope of the change I was making. No problem to do it now though. I'll do the same thing for UrlValidator.

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Reopened: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton reopened VALIDATOR-242:
---------------------------------------


Ben,

Firstly, great work on re-factoring both URL and Email validators - including extracting out the new IntetAddress and domain validators :) thanks!

I'm re-opening this because Email validator still has a dependency on Jakarta ORO with its use of Perl5Util in the Strip comments.

Also IMO it should improve performance if the regular expressions are not compiled for each email address 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

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Commented: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537474 ] 

Niall Pemberton commented on VALIDATOR-242:
-------------------------------------------

I deleted the new version of this validator in the routines" package and then re-added it again but copying so that the commit history is preserved:

http://svn.apache.org/viewvc?view=rev&revision=588102
http://svn.apache.org/viewvc?view=rev&revision=588103

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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


[jira] Resolved: (VALIDATOR-242) Move EmailValidator to routines package

Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VALIDATOR-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben Speakmon resolved VALIDATOR-242.
------------------------------------

    Resolution: Fixed

Yay, another issue slain!

> Move EmailValidator to routines package
> ---------------------------------------
>
>                 Key: VALIDATOR-242
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-242
>             Project: Commons Validator
>          Issue Type: Task
>          Components: Framework, Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Ben Speakmon
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>
> Move EmailValidator and associated tests to the routines package as part of its refactoring.

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