You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2008/03/01 02:10:26 UTC
Re: Generics support problem
I'm starting to see the problem here, as part of TAPESTRY-2202.
There's the possibility of mismatch between the BeanEditor model and
the object being edited. I think TAPESTRY-2202 will incidentally fix
it.
On Fri, Feb 29, 2008 at 12:58 PM, Davor Hrg <hr...@gmail.com> wrote:
> :(
>
> just tried wth javassist 3.7ga ... still breaks
> tried java 1.5 && 1.6 .. also breaks
> ...
> look like I'll have to investigate it much more
>
>
> Davor Hrg
>
>
>
> On 2/29/08, Davor Hrg <hr...@gmail.com> wrote:
> > generics support just crashed wierdly,
> >
> > not to say it is tapestry error ... still can not pinpoint reasons,
> > but found a cause...
> >
> >
> > the code broke with proeprtyconduit exception
> > ....Class java.lang.Object does not contain a property named ....
> >
> >
> > so, the case that causes a problem follows:
> >
> > I have:
> > list page
> > edit page
> > edit component for an entity (palced inside edit page of course :) )
> >
> > the editComponent extends a generic component that declares
> > public T getEntity()
> >
> > if I override it in edit component
> > public MyEnt getEntity()
> >
> > the property conduit breaks...
> > but that is not all, it breaks if first page accessed if list page
> >
> > if I restart the app and use edit page as first acces, all works well,
> >
> > ... I debugged the wierdass thing for few hours and found that
> > reflection code was broken and reporting wrong types ...
> >
> >
> > without override
> > public MyEnt getEntity()
> >
> > method.getGenericReturnType() returns TypeVariable...which is ok
> >
> >
> > with override, and with edit page as first
> > method.getGenericReturnType() returns MyEnt.class as is expected for
> > non generic methods (which this one realy is)
> >
> >
> > but the problematic situation is the wierd one,
> > with override, and with list page as first
> > method.getGenericReturnType() returns Object.class which is very wrong...
> >
> > so if anyone is having issues with generic support, look for this
> > problem in you code maybe...
> >
> > I'm willing to blame this on javassist, and hope it will work in a
> > next version ..
> >
> >
> > Davor Hrg
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
Creator Apache Tapestry and Apache HiveMind
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org