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
Thanks
--
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