[
https://issues.apache.org/jira/browse/WICKET-5069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov resolved WICKET-5069.
-------------------------------------
Resolution: Fixed
It seems this has been fixes with :
commit b3982a4beff352cd5e61521490a397a926c13eed
Author: svenmeier <[email protected]>
Date: Tue Mar 5 09:53:17 2013 +0100
WICKET-4594 moved pageParameters omission to AbstractBookmarkableMapper
Since this commit a 'null' is used as page parameters when creating the new
page.
> Validation and Code Quality Issues with "Default Constructor" on Re-creation
> after Page Expiry
> ----------------------------------------------------------------------------------------------
>
> Key: WICKET-5069
> URL: https://issues.apache.org/jira/browse/WICKET-5069
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.4.0
> Environment: All
> Reporter: bernard
>
> The name "Default Constructor" in Java is reserved for the no-argument
> constructor.
> However Wicket has a different idea of what a default constructor is.
> Let us consider the folowing case:
> No PageParameters exist for a page. Let this page have two constructors, one
> default constructor and one constructor with a PageParameters parameter.
> The page is bookmarkable and mounted.
> Let this page be re-created after session expiry so that no stored version of
> the page exists.
> The expected result is that the page is created with its default constructor
> because no PageParameters exist.
> The actual result is that PageProvider#resolvePageInstance() creates bogus
> PageParameters for the page and calls the constructor with PageParameters
> parameters.
> The impact of this is as follows:
> 1) Validation issue. A page parameters validating page must assume that if
> PageParameters exist that these have to be validated. If any parameters that
> are required for the page to live are missing then the application has to
> assume that the URL is invalid e.g. tampered with.
> 2) DRY code quality issue. If Wicket has already established that no
> PageParameters exist then the application again needs to check for bogus
> parameters which it would not have to do in the default constructor.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)