You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Simon Kitching (JIRA)" <de...@myfaces.apache.org> on 2005/11/03 04:14:55 UTC
[jira] Created: (MYFACES-777) AddResource uses static StringBuffer ADDITIONAL_JAVASCRIPT_TO_BODY_TAG for per-request data
AddResource uses static StringBuffer ADDITIONAL_JAVASCRIPT_TO_BODY_TAG for per-request data
-------------------------------------------------------------------------------------------
Key: MYFACES-777
URL: http://issues.apache.org/jira/browse/MYFACES-777
Project: MyFaces
Type: Bug
Reporter: Simon Kitching
The AddResource class has "getInstance" methods that return an instance of the class. However a single instance is shared across all threads servicing the same webapp (ie which have the same contextPath).
A member
private static StringBuffer ADDITIONAL_JAVASCRIPT_TO_BODY_TAG = null;
Is used to store per-request data by the method:
addJavaScriptToBodyTag
This is quite unsafe; multiple threads will interfere with the "body tag" text from other requests.
In addition, the all-caps style of variable naming implies that this member was meant to be a constant rather than a variable buffer.
I believe this member should be a private static final String, holding a key which is used to look up a StringBuffer in the current request params,
and that the "body tag" text should be stored in that buffer from the request params rather than stored directly on the AddResource class.
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (MYFACES-777) AddResource uses static StringBuffer ADDITIONAL_JAVASCRIPT_TO_BODY_TAG for per-request data
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-777?page=all ]
Martin Marinschek closed MYFACES-777:
-------------------------------------
Fix Version: Nightly
Resolution: Fixed
Assign To: Martin Marinschek
Has already been fixed yesterday.
regards,
Martin
> AddResource uses static StringBuffer ADDITIONAL_JAVASCRIPT_TO_BODY_TAG for per-request data
> -------------------------------------------------------------------------------------------
>
> Key: MYFACES-777
> URL: http://issues.apache.org/jira/browse/MYFACES-777
> Project: MyFaces
> Type: Bug
> Reporter: Simon Kitching
> Assignee: Martin Marinschek
> Fix For: Nightly
>
> The AddResource class has "getInstance" methods that return an instance of the class. However a single instance is shared across all threads servicing the same webapp (ie which have the same contextPath).
> A member
> private static StringBuffer ADDITIONAL_JAVASCRIPT_TO_BODY_TAG = null;
> Is used to store per-request data by the method:
> addJavaScriptToBodyTag
> This is quite unsafe; multiple threads will interfere with the "body tag" text from other requests.
> In addition, the all-caps style of variable naming implies that this member was meant to be a constant rather than a variable buffer.
> I believe this member should be a private static final String, holding a key which is used to look up a StringBuffer in the current request params,
> and that the "body tag" text should be stored in that buffer from the request params rather than stored directly on the AddResource class.
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira