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=21498>. 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=21498 AntClassLoader. Problem with loading classes that can throw exception from static initializer. Summary: AntClassLoader. Problem with loading classes that can throw exception from static initializer. Product: Ant Version: 1.5.3 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] AntClassLoader has the problem during loading classes, that can throw an exception from static initializer code. E.g. we have a class that loads native library and that library does not exist. Normally when such class is loading with default ClassLoader UnsatisfiedLinkError will be thrown. But method AntClassLoader.initializeClass(Class theClass) catches Throwable and BuildException occured during executing has the cause: NullPointerException not UnsatisfiedLinkError. Temporary solution can be: catch only exceptions that can occure in method Constructor.newInstance all other exceptions should be rethrown with BuildException. But this is not fully correct because exceptions thrown by Constructor.newInstance can occure in static initializer of loaded class also. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]