On Sunday 04 November 2007 01:23:39 Eelco Hillenius wrote: > > IMHO it does make sense. When I see several different super(...) calls in > > constructors the first thing that crosses my mind is that these > > superclass constructors have different logic. But it's not true for > > wicket and in most Component subclasses I can call super(id, > > (IModel)null). Can I?
Sorry for commenting myself. The point was that using only one call to super(...) can make code more explicit. For instance to make sure that all WebPage constructors do afterall "the same" thing you have to go through hierarchy to Component. I guess that's what the original post was about. > Yep, you could. Though some constructors in other classes (in or > outside Wicket) might expect not-null arguments passed in in > constructors. It just depends on who implemented it. There is no > golden pattern that everyone follows; if there was, it should probably > be enforced in the language. Thanks. I agree there is no golden pattern, but to have in jdk something like @Nullable and @NotNull would be nice :) Dima --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
