You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by co...@jakarta.apache.org on 2004/08/12 07:08:21 UTC
[jira] Assigned: (JELLY-113) TagSupport concurrency issue
Message:
The following issue has been re-assigned.
Assignee: dion gillard (mailto:dion@apache.org)
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/JELLY-113
Here is an overview of the issue:
---------------------------------------------------------------------
Key: JELLY-113
Summary: TagSupport concurrency issue
Type: Bug
Status: Open
Priority: Major
Project: jelly
Components:
core / taglib.core
Assignee: dion gillard
Reporter: Gary Franklin
Created: Thu, 1 Jul 2004 7:47 AM
Updated: Wed, 11 Aug 2004 10:07 PM
Description:
Assume you have a jelly tag <j:jelly> with children. The following sequence leads to concurrency problems:
1. Instance 1 of Tag is created on thread 1. Body is ScriptBlock
2. Instance 2 of Tag is created on thread 2. Body is same ScriptBlock as Instance 1.
3. doTag -> invokeBody -> getBody -> trimBody is called for Instance 1
4. same for instance 2
5. Instance 1 gets the size of the ScriptBlock
6. Instance 2 gets the size of the ScriptBlock
7. Instance 1 trims whitespace blocks
8. Instance 2 gets an IndexOutOfBounds exception since it resumes execution with an incorrect list size (list was changed by Instance 1).
Both threads concurrently trim the same ScriptBody (the hasTrimmed variable is instance-specific). The attached patch synchronizes access to the body within trimBody.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org