You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2011/07/24 05:33:09 UTC
[jira] [Created] (TAP5-1585) @InjectPage annotation can leak page
instances from one locale to another
@InjectPage annotation can leak page instances from one locale to another
-------------------------------------------------------------------------
Key: TAP5-1585
URL: https://issues.apache.org/jira/browse/TAP5-1585
Project: Tapestry 5
Issue Type: Bug
Components: tapestry-core
Affects Versions: 5.3, 5.2
Reporter: Howard M. Lewis Ship
Noticed this code:
private final class InjectedPageConduit extends ReadOnlyFieldValueConduit
{
private final String injectedPageName;
private Object page;
private InjectedPageConduit(ComponentResources resources, String fieldName,
String injectedPageName)
{
super(resources, fieldName);
this.injectedPageName = injectedPageName;
resources.addPageLifecycleListener(new PageLifecycleAdapter()
{
@Override
public void containingPageDidDetach()
{
page = null;
}
});
}
public Object get(Object instance, InstanceContext context)
{
if (page == null)
page = componentSource.getPage(injectedPageName);
return page;
}
Basically, what we have here is a field per instance storing the page ... this should go in a PerThreadValue. As currently coded, there will be windows where a page in one locale will have a page in some other locale injected into it since the single field is injected across locale (and, in 5.3, ComponentResourceSelector axis').
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1585) @InjectPage annotation can leak page
instances from one locale to another
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070099#comment-13070099 ]
Hudson commented on TAP5-1585:
------------------------------
Integrated in tapestry-trunk-freestyle #431 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/431/])
TAP5-1585: @InjectPage annotation can leak page instances from one locale to another
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150276
Files :
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/InjectPageWorker.java
> @InjectPage annotation can leak page instances from one locale to another
> -------------------------------------------------------------------------
>
> Key: TAP5-1585
> URL: https://issues.apache.org/jira/browse/TAP5-1585
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.2
> Reporter: Howard M. Lewis Ship
> Assignee: Howard M. Lewis Ship
> Labels: thread-safety
> Fix For: 5.3
>
>
> Noticed this code:
> private final class InjectedPageConduit extends ReadOnlyFieldValueConduit
> {
> private final String injectedPageName;
> private Object page;
> private InjectedPageConduit(ComponentResources resources, String fieldName,
> String injectedPageName)
> {
> super(resources, fieldName);
> this.injectedPageName = injectedPageName;
> resources.addPageLifecycleListener(new PageLifecycleAdapter()
> {
> @Override
> public void containingPageDidDetach()
> {
> page = null;
> }
> });
> }
> public Object get(Object instance, InstanceContext context)
> {
> if (page == null)
> page = componentSource.getPage(injectedPageName);
> return page;
> }
> Basically, what we have here is a field per instance storing the page ... this should go in a PerThreadValue. As currently coded, there will be windows where a page in one locale will have a page in some other locale injected into it since the single field is injected across locale (and, in 5.3, ComponentResourceSelector axis').
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1585) @InjectPage annotation can leak page
instances from one locale to another
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070099#comment-13070099 ]
Hudson commented on TAP5-1585:
------------------------------
Integrated in tapestry-trunk-freestyle #431 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/431/])
TAP5-1585: @InjectPage annotation can leak page instances from one locale to another
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150276
Files :
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/InjectPageWorker.java
> @InjectPage annotation can leak page instances from one locale to another
> -------------------------------------------------------------------------
>
> Key: TAP5-1585
> URL: https://issues.apache.org/jira/browse/TAP5-1585
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.2
> Reporter: Howard M. Lewis Ship
> Assignee: Howard M. Lewis Ship
> Labels: thread-safety
> Fix For: 5.3
>
>
> Noticed this code:
> private final class InjectedPageConduit extends ReadOnlyFieldValueConduit
> {
> private final String injectedPageName;
> private Object page;
> private InjectedPageConduit(ComponentResources resources, String fieldName,
> String injectedPageName)
> {
> super(resources, fieldName);
> this.injectedPageName = injectedPageName;
> resources.addPageLifecycleListener(new PageLifecycleAdapter()
> {
> @Override
> public void containingPageDidDetach()
> {
> page = null;
> }
> });
> }
> public Object get(Object instance, InstanceContext context)
> {
> if (page == null)
> page = componentSource.getPage(injectedPageName);
> return page;
> }
> Basically, what we have here is a field per instance storing the page ... this should go in a PerThreadValue. As currently coded, there will be windows where a page in one locale will have a page in some other locale injected into it since the single field is injected across locale (and, in 5.3, ComponentResourceSelector axis').
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TAP5-1585) @InjectPage annotation can leak page
instances from one locale to another
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1585.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.3
> @InjectPage annotation can leak page instances from one locale to another
> -------------------------------------------------------------------------
>
> Key: TAP5-1585
> URL: https://issues.apache.org/jira/browse/TAP5-1585
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.2
> Reporter: Howard M. Lewis Ship
> Assignee: Howard M. Lewis Ship
> Labels: thread-safety
> Fix For: 5.3
>
>
> Noticed this code:
> private final class InjectedPageConduit extends ReadOnlyFieldValueConduit
> {
> private final String injectedPageName;
> private Object page;
> private InjectedPageConduit(ComponentResources resources, String fieldName,
> String injectedPageName)
> {
> super(resources, fieldName);
> this.injectedPageName = injectedPageName;
> resources.addPageLifecycleListener(new PageLifecycleAdapter()
> {
> @Override
> public void containingPageDidDetach()
> {
> page = null;
> }
> });
> }
> public Object get(Object instance, InstanceContext context)
> {
> if (page == null)
> page = componentSource.getPage(injectedPageName);
> return page;
> }
> Basically, what we have here is a field per instance storing the page ... this should go in a PerThreadValue. As currently coded, there will be windows where a page in one locale will have a page in some other locale injected into it since the single field is injected across locale (and, in 5.3, ComponentResourceSelector axis').
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (TAP5-1585) @InjectPage annotation can leak page
instances from one locale to another
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAP5-1585:
------------------------------------------
Assignee: Howard M. Lewis Ship
> @InjectPage annotation can leak page instances from one locale to another
> -------------------------------------------------------------------------
>
> Key: TAP5-1585
> URL: https://issues.apache.org/jira/browse/TAP5-1585
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.2
> Reporter: Howard M. Lewis Ship
> Assignee: Howard M. Lewis Ship
> Labels: thread-safety
>
> Noticed this code:
> private final class InjectedPageConduit extends ReadOnlyFieldValueConduit
> {
> private final String injectedPageName;
> private Object page;
> private InjectedPageConduit(ComponentResources resources, String fieldName,
> String injectedPageName)
> {
> super(resources, fieldName);
> this.injectedPageName = injectedPageName;
> resources.addPageLifecycleListener(new PageLifecycleAdapter()
> {
> @Override
> public void containingPageDidDetach()
> {
> page = null;
> }
> });
> }
> public Object get(Object instance, InstanceContext context)
> {
> if (page == null)
> page = componentSource.getPage(injectedPageName);
> return page;
> }
> Basically, what we have here is a field per instance storing the page ... this should go in a PerThreadValue. As currently coded, there will be windows where a page in one locale will have a page in some other locale injected into it since the single field is injected across locale (and, in 5.3, ComponentResourceSelector axis').
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TAP5-1585) @InjectPage annotation can leak page
instances from one locale to another
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1585.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.3
> @InjectPage annotation can leak page instances from one locale to another
> -------------------------------------------------------------------------
>
> Key: TAP5-1585
> URL: https://issues.apache.org/jira/browse/TAP5-1585
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.2
> Reporter: Howard M. Lewis Ship
> Assignee: Howard M. Lewis Ship
> Labels: thread-safety
> Fix For: 5.3
>
>
> Noticed this code:
> private final class InjectedPageConduit extends ReadOnlyFieldValueConduit
> {
> private final String injectedPageName;
> private Object page;
> private InjectedPageConduit(ComponentResources resources, String fieldName,
> String injectedPageName)
> {
> super(resources, fieldName);
> this.injectedPageName = injectedPageName;
> resources.addPageLifecycleListener(new PageLifecycleAdapter()
> {
> @Override
> public void containingPageDidDetach()
> {
> page = null;
> }
> });
> }
> public Object get(Object instance, InstanceContext context)
> {
> if (page == null)
> page = componentSource.getPage(injectedPageName);
> return page;
> }
> Basically, what we have here is a field per instance storing the page ... this should go in a PerThreadValue. As currently coded, there will be windows where a page in one locale will have a page in some other locale injected into it since the single field is injected across locale (and, in 5.3, ComponentResourceSelector axis').
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (TAP5-1585) @InjectPage annotation can leak page
instances from one locale to another
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAP5-1585:
------------------------------------------
Assignee: Howard M. Lewis Ship
> @InjectPage annotation can leak page instances from one locale to another
> -------------------------------------------------------------------------
>
> Key: TAP5-1585
> URL: https://issues.apache.org/jira/browse/TAP5-1585
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.2
> Reporter: Howard M. Lewis Ship
> Assignee: Howard M. Lewis Ship
> Labels: thread-safety
>
> Noticed this code:
> private final class InjectedPageConduit extends ReadOnlyFieldValueConduit
> {
> private final String injectedPageName;
> private Object page;
> private InjectedPageConduit(ComponentResources resources, String fieldName,
> String injectedPageName)
> {
> super(resources, fieldName);
> this.injectedPageName = injectedPageName;
> resources.addPageLifecycleListener(new PageLifecycleAdapter()
> {
> @Override
> public void containingPageDidDetach()
> {
> page = null;
> }
> });
> }
> public Object get(Object instance, InstanceContext context)
> {
> if (page == null)
> page = componentSource.getPage(injectedPageName);
> return page;
> }
> Basically, what we have here is a field per instance storing the page ... this should go in a PerThreadValue. As currently coded, there will be windows where a page in one locale will have a page in some other locale injected into it since the single field is injected across locale (and, in 5.3, ComponentResourceSelector axis').
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira