You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2010/08/09 02:15:16 UTC

[jira] Commented: (WICKET-2969) Throw an IllegalStateException for already implemented onInitialize methods

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

Hudson commented on WICKET-2969:
--------------------------------

Integrated in Apache Wicket 1.4.x #82 (See [http://hudson.zones.apache.org/hudson/job/Apache%20Wicket%201.4.x/82/])
    

> Throw an IllegalStateException for already implemented onInitialize methods
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-2969
>                 URL: https://issues.apache.org/jira/browse/WICKET-2969
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.9
>            Reporter: Pedro Santos
>         Attachments: patch.txt
>
>
> As discussed on the devs mail list, the oninitialize method may already be implemented by some user. The Component on the next release can throw an IllegalStateException  for those situations. IMO it is better than have this method called twice. I'm sending an patch with the implementation and an test for it.
> On a related note, the onInitialize javadoc says:
>      * Overrides must call super#{@link #onInitialize()}. Usually this should be the first thing an
>      * override does, much like a constructor.
> I just put that super call on the onInitialize overriding methods at the ComponentInitializationTest.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.