whenever there is something nonfinal people will always find a way to misuse it.

model methods are not final because it gives you a simple base class
to subclass instead of starting from scratch with an imodel.

-igor

On Mon, Oct 20, 2008 at 6:37 AM, Ricky <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there any reason getObject and setObject were not made final in Model
> class? the reason why i am asking is that there might be the case when
> people misuse this; for example (and i have seen this at my current
> workplace);
>
>        Model xModel = new Model(new Long(1)) {
>
>            @Override
>            public Object getObject() {
>                // return super.getObject(); <-- not calling this, instead i
> return null
>                return null;
>            }
>        };
>
>        // some lines afterwards ... i need this model ... i use it
> (expecting to get back object i set)
>        // instead i get null. Original intent was to set object passed in
> and get the same thing ...
>        System.out.println(xModel.getObject());
>
> Here i get null as the result.
>
> Any suggestions?
>
> Regards
> Vyas, Anirudh
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to