It is being compiled with JDK 1.5.0_22, as I take that as the only safe way... Compatibility out has the tendency to miss 'new methods' and such.
On Thu, Oct 7, 2010 at 3:52 PM, Stanislav Muhametsin <[email protected]> wrote: > Quoting Niclas Hedhman <[email protected]>: > >> Gangs, >> >> I have been trying to locate why the following code snippets compile >> and works on Java6, but doesn't compile on Java5. Note that the >> generics are for the method only. We have it declared at the class >> level (on the called class) in which case it compiles. Any pointer to >> what is going on is greatly appreciated. If we can't figure this out, >> I think we would need to move Qi4j to Java 6 even though it doesn't >> make sense for any other reason. >> >> public abstract class AbstractModifierModel >> { >> public <ThrowableType extends Throwable> void visitModel( >> ModelVisitor<ThrowableType> modelVisitor ) >> throws ThrowableType >> { >> constructorsModel.visitModel( modelVisitor ); // Compile >> error on this line >> } >> } >> >> public final class ConstructorsModel >> { >> public <ThrowableType extends Throwable> void visitModel( >> ModelVisitor<ThrowableType> modelVisitor ) >> throws ThrowableType >> { >> : >> } >> } >> >> >> The compile error is; >> >> >> /home/niclas/qi4j/qi4j-core/runtime/src/main/java/org/qi4j/runtime/composite/AbstractModifierModel.java:[75,36] >> unreported exception java.lang.Throwable; must be caught or declared >> to be thrown >> >> >> > > Do you compile it with JDK 1.6 set to 1.5 compatibility level, or is > installed JDK actually 1.5? And which OS? > > I have JDK 1.6 (u20), which compiles that on 1.5 compatibility level (in > Eclipse), on Win7 x64, and no compilation errors. > > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev > -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

