Patch: FYI: Exception cleanup in gnu.gcj.runtime.VMClassLoader
Bryce McKinlay
mckinlay@redhat.com
Mon Jul 5 23:17:00 GMT 2004
VMClassLoader had an exception handler block like the following:
catch (Exception x)
{
// Just ignore any badness.
}
This sort of thing is a bad idea because a) it can hide real exceptions
deep within the runtime, causing hard-to-debug problems later; and b) it
promotes the use of exceptions as part of normal execution flow, which
is a bad idea for performance reasons (we especially want to avoid this
during runtime startup).
I'm checking in the following patch, which adds a specific handler for
the checked MalformedURLException. This exception should never happen,
so we just rethrow it as a RuntimeException if it does.
Regards
Bryce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgcj-vmclassloader.patch
Type: text/x-patch
Size: 3124 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040705/8ab4efd2/attachment.bin>
More information about the Java-patches
mailing list