On Sun, 25 May 2008, Igor Vaynberg wrote:
> so here is what i propose:
>
> formcomponents are "single type" components where the type is well
> known. so we should probably have:
>
> class formcomponent {
>
> public FINAL <X> IConverter<X> getConverter(Class<X> type) {
> if (type==well_known_formcomponent_type) {
> return getConverter();
> } else { return super.getConverter(type); }
> }
>
> public IConverter<T> getConverter() {
> return super.getConverter(well_known_formcomponent_type);
> }
> }
Yeah, it seems to me that that's how it should be, except
the "final" in getConverter(Class). We recently had an
issue with getConverter and Hibernate proxies, and it seems
that the type == ... comparison there would return erroneosly
false for the same reason (when looking for a converter for
an instance of a proxy class).
Best wishes,
Timo
--
Timo Rantalaiho
Reaktor Innovations Oy <URL: http://www.ri.fi/ >