You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Dilger (Updated) (JIRA)" <ji...@apache.org> on 2011/10/08 13:18:29 UTC

[jira] [Updated] (WICKET-4114) Mark getRequestCycleProvider in Application final

     [ https://issues.apache.org/jira/browse/WICKET-4114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Dilger updated WICKET-4114:
----------------------------------

    Attachment: 0001-WICKET-4114-Mark-getRequestCycleProvider-as-final.patch
    
> Mark getRequestCycleProvider in Application final
> -------------------------------------------------
>
>                 Key: WICKET-4114
>                 URL: https://issues.apache.org/jira/browse/WICKET-4114
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.1
>            Reporter: Martin Dilger
>         Attachments: 0001-WICKET-4114-Mark-getRequestCycleProvider-as-final.patch
>
>
> A Developer should not be able to override getRequestCycleProvider, as this breaks some Functionality in BaseWicketTester, and to find out what goes wrong can be timeconsuming and can cause headaches.
> BaseWicketTester does the following:
> application.setRequestCycleProvider(new TestRequestCycleProvider(
> 			application.getRequestCycleProvider()));
> TestRequestCycleProvider provides the ability to force a certain RequestHandler (for example to Render a page used for BaseWicketTester#startPage, 
> this ignores the normal Process to resolve a RequestHandler.
> If you override Application#getRequestCycleProvider, the Test will fail as Wicket will resolve the last RequestMapper in the Chain which is typically the HomePageMapper.
> You Test will fail, and you might have real problems to find out whats going on, as I had last night.
> Therefore I strongly recommend to mark #getRequestCycleProvider final. A developer has still the possibility to set a RequestCycleProvider with #setRequestCycleProvider, so we do not lose anything here.
> Thanks
> Martin Dilger

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira