DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23696>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23696 JUnitTestRunner masks exceptions Summary: JUnitTestRunner masks exceptions Product: Ant Version: 1.5.4 Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Optional Tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In JUnitTestRunner there is this code that finds methods: try { // check if there is a suite method suiteMethod = testClass.getMethod("suite", new Class[0]); } catch (Exception e) { // no appropriate suite method found. We don't report any // error here since it might be perfectly normal. We don't // know exactly what is the cause, but we're doing exactly // the same as JUnit TestRunner do. We swallow the exceptions. } the catch also catches an java.lang.ExceptionInInitializerError, which is just trashed. When the class is accessed again later on in TestSuite, you get a NoClassDefFoundError, leaving you completely in the dark about the cause of the problem. I think the catch should just catch NoSuchMethodError, and let other Exceptions propagate. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]