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 (Commented) (JIRA)" <ji...@apache.org> on 2011/11/14 15:10:51 UTC

[jira] [Commented] (WICKET-4201) IPageProvider and its implementations need to be improved

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

Andrea Del Bene commented on WICKET-4201:
-----------------------------------------

Another limit of the current implementation of getPageClass came out working on  WICKET-4029. As side effect this method invokes AbstractPageManager.getPage(int id) making the page "touched". If we call getPageClass after request has been committed ( i.e. after IPageManage.commitRequest() ), the page is left locked.
                
> IPageProvider and its implementations need to be improved
> ---------------------------------------------------------
>
>                 Key: WICKET-4201
>                 URL: https://issues.apache.org/jira/browse/WICKET-4201
>             Project: Wicket
>          Issue Type: Task
>          Components: wicket
>    Affects Versions: 1.5.0, 1.5.1, 1.5.2
>            Reporter: Emond Papegaaij
>             Fix For: 1.6.0
>
>
> During the development op 1.5, IPageProvider and its implementations have become a bit of a mess. The interface is not clearly defined. One of the biggest problems is that several methods can throw exceptions and there is no way of knowing which method will throw which exception and when. It should always be clear what exceptions to expect. For example, getPage can throw a PageExpiredException, but getPageClass cannot, it should return null if no page class is set. Perhaps, it's even better to never throw exceptions at all. Also, the various introspection methods are not very well defined and make it almost impossible to come up with an alternative implementation of the interface (which, IMHO is a sign of a broken API).
> Changing this interface is not an option for 1.5, but looking at the number of subtle bugs that came from this part of the code, it should really be considered for wicket.next.

--
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