[
https://jira.codehaus.org/browse/MNG-5314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason van Zyl updated MNG-5314:
-------------------------------
Fix Version/s: 3.0.5
> DefaultModelValidator misuses String.matches
> --------------------------------------------
>
> Key: MNG-5314
> URL: https://jira.codehaus.org/browse/MNG-5314
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: Bootstrap & Build
> Affects Versions: 3.0.4
> Reporter: Jesse Glick
> Assignee: Jason van Zyl
> Priority: Minor
> Fix For: 3.0.5
>
> Attachments: DefaultModelValidator.diff
>
>
> While investigating MNG-5312, a profiler run turned up tens of thousands of
> calls to {{DefaultModelValidator.validateId}} consuming a considerable
> portion of total CPU time. Turns out the existing code uses
> {{String.matches}}, which recompiles the regex on each call, which is far
> more expensive than applying a precompiled pattern. A trivial fix makes this
> method disappear from the hot spots shown by the profiler, though the fix of
> MNG-5312 of course means that there would be far fewer calls to this method
> to begin with.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira