Java generics are compile-time only. They are lost at run-time, Tapestry has no way to check this.
On Apr 16, 2012, at 7:42 PM, Paul Stanton wrote: > Hi all, > > I have a component with a parameter using a generic type eg: > > public class MyComponent > { > @Parameter > private List<MyType> collectionParameter; > } > > However I can set the parameter with a List of any generic type: > > public class MyPage > { > @Property > private List<OtherType> otherCollection; > } > > <t:myComponent collectionParameter="otherCollection" /> > > ... and no exception is thrown. > > Is this expected behaviour? Shouldn't the generic type be checked in this > case? > > Cheers, p. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org