You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/07/11 08:59:04 UTC
[jira] [Commented] (WW-4350) OgnlValueStack causes race condition
[ https://issues.apache.org/jira/browse/WW-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14058493#comment-14058493 ]
ASF subversion and git services commented on WW-4350:
-----------------------------------------------------
Commit 7e477b956bd8d57597b649014a20d0d69fae1ce0 in struts's branch refs/heads/develop from [~lukaszlenart]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=7e477b9 ]
WW-4350 Solves problem with race condition
> OgnlValueStack causes race condition
> ------------------------------------
>
> Key: WW-4350
> URL: https://issues.apache.org/jira/browse/WW-4350
> Project: Struts 2
> Issue Type: Bug
> Components: Core Actions, Value Stack
> Affects Versions: 2.3.16.1
> Reporter: Sergey Gromov
> Fix For: 2.3.18
>
> Attachments: CompoundRootAccessor.java.patch
>
>
> _com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.callMethod_ is not thread safe because of unsynchronized reads and writes to HashMap:
> {code}
> private static Map invalidMethods = new HashMap();
> ...
> public Object callMethod(Map context, Object target, String name, Object[] objects) throws MethodFailedException {
> ...
> if ((argTypes == null) || !invalidMethods.containsKey(mc)) {
> ...
> invalidMethods.put(mc, Boolean.TRUE);
> ...
> }
> ...
> }
> {code}
> Propose to use _ConcurrentHashMap_
--
This message was sent by Atlassian JIRA
(v6.2#6252)