You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Musachy Barroso (JIRA)" <ji...@apache.org> on 2009/08/12 06:07:59 UTC
[jira] Resolved: (WW-3204) Replace synchronized section in
AnnotationActionValidatorManager.getValidators with a
ReentrantReadWriteLock implementation
[ https://issues.apache.org/struts/browse/WW-3204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso resolved WW-3204.
---------------------------------
Resolution: Won't Fix
if it ain't broken...don't fix it
> Replace synchronized section in AnnotationActionValidatorManager.getValidators with a ReentrantReadWriteLock implementation
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: WW-3204
> URL: https://issues.apache.org/struts/browse/WW-3204
> Project: Struts 2
> Issue Type: Sub-task
> Affects Versions: 2.1.7
> Reporter: Musachy Barroso
> Assignee: Musachy Barroso
> Fix For: 2.1.8
>
>
> something like:
> lock.readLock().lock();
> try {
> if (validatorCache.containsKey(validatorKey)) {
> if (FileManager.isReloadingConfigs()) {
> lock.writeLock().lock();
> try {
> if (validatorCache.containsKey(validatorKey))
> validatorCache.put(validatorKey, buildValidatorConfigs(clazz, context, true, null));
> } finally {
> lock.writeLock().unlock();
> }
> }
> } else {
> lock.writeLock().lock();
> try {
> if (!validatorCache.containsKey(validatorKey))
> validatorCache.put(validatorKey, buildValidatorConfigs(clazz, context, false, null));
> } finally {
> lock.writeLock().unlock();
> }
> }
> } finally {
> lock.readLock().unlock();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.