You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2011/09/17 19:57:09 UTC
[jira] [Resolved] (WICKET-3994) MockWebApplication double
invocation of cycle.detach()
[ https://issues.apache.org/jira/browse/WICKET-3994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-3994.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.4.19
Assignee: Igor Vaynberg
> MockWebApplication double invocation of cycle.detach()
> ------------------------------------------------------
>
> Key: WICKET-3994
> URL: https://issues.apache.org/jira/browse/WICKET-3994
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.16, 1.4.17, 1.4.18
> Reporter: Daniele Cremonini
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.4.19
>
> Attachments: fix-WICKET-3994.patch
>
>
> Porting JAMon integration to Wicket 1.4 test JamonMonitoredWebRequestCycleTest (a WicketStuff class) fails do I discovered a double invocation that seems a bug. Explanation follows.
> MockWebApplication.processRequestCycle(WebRequestCycle) method calls
> cycle.request();
> then
> cycle.detach();
> but cycle.detach() is also called inside cycle.request() resulting in a double invocation.
> public void processRequestCycle(WebRequestCycle cycle)
> {
> try
> {
> cycle.request();
> if (cycle.wasHandled() == false)
> {
> cycle.setRequestTarget(new WebErrorCodeResponseTarget(
> HttpServletResponse.SC_NOT_FOUND));
> }
> cycle.detach(); // <== second invocation, I would remove it
> createRequestCycle();
> parametersForNextRequest.clear();
> servletRequest.getParameterMap().clear();
> }
> finally
> {
> cycle.getResponse().close();
> }
> postProcessRequestCycle(cycle);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira