You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Juergen Donnerstag <ju...@gmail.com> on 2009/04/14 11:25:11 UTC

ModalWindow: all methods are non-final

In ModalWindow.java all public and protected methods are non-final,
even getters and setters. Any objections against making them final? Of
course in cases where a user subclassed ModelWindow and extended
certain methods, his/her application will no longer compile if the
super method is now final.

Juergen

Re: ModalWindow: all methods are non-final

Posted by Juergen Donnerstag <ju...@gmail.com>.
I don't want to final ALL methods. Methods which users are likely to
have subclassed should remain non-final. But getters and setters for
internal variables most likely have not been subclassed. In
wicket-core we decided to keep the public API (the contract) as
concise and strict as possible and only release it (remove final) for
a good reason (use case). By doing so, we had a much higher degree of
freedom to make internal changes which we were sure don't break
existing code. I still belief it is a good principle and that its
worth apply it to code outside wicket-code as well.

Juergen

Re: ModalWindow: all methods are non-final

Posted by Martijn Dashorst <ma...@gmail.com>.
The problem with closing a previously open API is that it hurts folks.
When something is not made final, people will override it.

I'm not comfortable with doing this now (modal window has been with
Wicket since 1.2, and is widely used with the current API).

Martijn

On Tue, Apr 14, 2009 at 3:48 PM, Johan Compagner <jc...@gmail.com> wrote:
> any reason to do it?
>
> I am not against it but i can think of stuff like show or close methods that
> people do override
>
>
> On Tue, Apr 14, 2009 at 11:25, Juergen Donnerstag <
> juergen.donnerstag@gmail.com> wrote:
>
>> In ModalWindow.java all public and protected methods are non-final,
>> even getters and setters. Any objections against making them final? Of
>> course in cases where a user subclassed ModelWindow and extended
>> certain methods, his/her application will no longer compile if the
>> super method is now final.
>>
>> Juergen
>>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

Re: ModalWindow: all methods are non-final

Posted by Johan Compagner <jc...@gmail.com>.
any reason to do it?

I am not against it but i can think of stuff like show or close methods that
people do override


On Tue, Apr 14, 2009 at 11:25, Juergen Donnerstag <
juergen.donnerstag@gmail.com> wrote:

> In ModalWindow.java all public and protected methods are non-final,
> even getters and setters. Any objections against making them final? Of
> course in cases where a user subclassed ModelWindow and extended
> certain methods, his/her application will no longer compile if the
> super method is now final.
>
> Juergen
>