I haven't read the whole thread, but you should be fine as long as your returned page class uses generics...
Here's what I use in one app, no warnings, no casts: @Override public Class<? extends Page<?>> getHomePage() { return Home.class; } public class Home extends WebPage<Void> { } -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jun 5, 2008 at 9:05 PM, Rod Good <[EMAIL PROTECTED]> wrote: > Thanks Peter (and Martin and Larry). > > My issue was specifically with overriding > > Class<? extends Page<?>> getHomePage() > > from the Application class, when extending AuthenticatedWebApplication. > > It looks the same as the problem below, but not quite... > > Is there an idiom for overriding getHomePage() in Wicket 1.4 ? I'm > getting around it with a shocking cast, I'm sure others have run into > the same problem. > > -----Original Message----- > From: Peter Ertl [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 4 June 2008 6:32 PM > To: users@wicket.apache.org > Subject: Re: (Class<? extends Page<?>>) casting troubles > > I remember that having more than one wildcard in an type expression > seems to be inherently broken. > > Usually you can rewrite something like > > void foo(Class<? extends Page<?>> pageClass) > > into something like > > <X extends Page<?>> void foo(Class<X> pageClass) > > I would bet this solves your problem :-) > > However, nobody can explain why... :-( > > Probably some lack of the generics specification, broken compiler, or > whatever... > > I would suggest to avoid more than one wildcard in one type expression > in general and use above workaround. > > Cheers > Peter > > > Am 04.06.2008 um 10:10 schrieb Johan Compagner: > > > Yeah it is very strange that you get different errors in eclipse and > > javac. > > I wonder which one is correcct.. > > > > But you have to generify the Page then it should work fine (like > > <Void>) > > > > I think we just need to drop the <?> in that example What do you > > exactly call? > > > > > > johan > > > > > > On Wed, Jun 4, 2008 at 9:39 AM, Rod Good <[EMAIL PROTECTED]> > > wrote: > > > >> Hi, > >> > >> I'm getting inconvertible type errors when I compile from Maven on > >> the command line with Java 6. > >> > >> Does anyone know if this issue was resolved ? I am building against > >> 1.4-m2 - downloaded today (04-06-2008). > >> > >> The issue is the same as noted by Ryan Mckinley on 05/21/2008 : > >> > >>> > >>> strangely, things work fine for me in eclipse, but from the command > >> line, I still get: > >>> > >>> $ mvn clean install: > >>> > >>> > >> /Users/ryan/Documents/workspace/dexter/website/src/java/dexter/ > >> website/ > >> wicket/page/DownloadingPage.java:[18,97] inconvertible types found : > >> java.lang.Class<dexter.website.wicket.page.account.DexSignInPage> > >> required: java.lang.Class<? extends org.apache.wicket.Page<?>> > >>> > >>> I ran: mvn clean install in the wicket directory... > >>> > >>> Not sure if the java version is helpful: ryan$ mvn -version Maven > >> version: 2.0.6 ryan$ javac -version javac 1.6.0_04-dp > >> > >> Thanks, > >> Rod. > >> > >> NOTICE > >> This e-mail and any attachments are confidential and may contain > >> copyright material of Macquarie Group Limited or third parties. If > >> you are not the intended recipient of this email you should not read, > > >> print, re- transmit, store or act in reliance on this e-mail or any > >> attachments, and should destroy all copies of them. Macquarie Group > >> Limited does not guarantee the integrity of any emails or any > >> attached files. The views or opinions expressed are the author's own > >> and may not reflect the views or opinions of Macquarie Group Limited. > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >