You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Maurizio Cucchiara (JIRA)" <ji...@apache.org> on 2013/06/12 12:38:21 UTC
[jira] [Commented] (WW-4101) RegexFieldValidator should precompile
patterns
[ https://issues.apache.org/jira/browse/WW-4101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13681092#comment-13681092 ]
Maurizio Cucchiara commented on WW-4101:
----------------------------------------
I didn't see many options here: validators are instanciated per request and per field as well, hence Struts for every regex validations (a) builds a new RFV (b) sets the regex string (c) compile the regex.
I took a quick look at the implementation and AFAICS there can be at least one compilation, whenever it occurs doesn't matter.
> RegexFieldValidator should precompile patterns
> ----------------------------------------------
>
> Key: WW-4101
> URL: https://issues.apache.org/jira/browse/WW-4101
> Project: Struts 2
> Issue Type: Improvement
> Components: Core Actions
> Affects Versions: 2.3.14.3
> Reporter: Marcin Kamionowski
> Fix For: 2.3.16
>
>
> RegexFieldValidator compile pattern for each execution of method validate so it's much slower.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira