You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrea Del Bene (Jira)" <ji...@apache.org> on 2019/10/14 16:18:00 UTC

[jira] [Comment Edited] (WICKET-6699) "queue" in WizardStep constructor can cause RuntimeException

    [ https://issues.apache.org/jira/browse/WICKET-6699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951112#comment-16951112 ] 

Andrea Del Bene edited comment on WICKET-6699 at 10/14/19 4:17 PM:
-------------------------------------------------------------------

After some more investigation I've found the culprit. Queued components are keep in a transient variable

 
{quote}private transient ComponentQueue queue;
{quote}
 

so after page is serialized this queue is lost and that's why we get this exception if we return to the first version of the page clicking "Back" button. This might be fixed removing the 'transient' modifier but I'm not sure of possible side effects, so I'd rather keep the code as is.


was (Author: bitstorm):
After some more investigation I've found the culprit. Queued components are keep in a transient variable

{{{quote}}}

private transient ComponentQueue queue;

{{{quote}}}

so after page is serialized this queue is lost and that's why we get this exception if we return to the first version of the page clicking "Back" button. This might be fixed removing the 'transient' modifier but I'm not sure of possible side effects, so I'd rather keep the code as is.

> "queue" in WizardStep constructor can cause RuntimeException
> ------------------------------------------------------------
>
>                 Key: WICKET-6699
>                 URL: https://issues.apache.org/jira/browse/WICKET-6699
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 8.5.0, 7.15.0
>            Reporter: Manuel Holzrichter
>            Assignee: Andrea Del Bene
>            Priority: Major
>         Attachments: wicket-step-queue.zip
>
>
> If components are added to the constructor using the org.apache.wicket.MarkupContainer#queue method, a RuntimeException may occur under certain circumstances.
> steps to reproduce error:
>  # click "next"
>  # Browser Back-Button
>  # click "next"
>  # Unexpected RuntimeException
> If the components are added with the add method, the error does not occur. Similarly, the error does not occur if the components are added in the onInitialize() method. No matter if with "queue" or "add".
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)