From: kkolinko Date: Tue, 9 Mar 2010 15:04:53 +0000 (+0000) Subject: https://issues.apache.org/bugzilla/show_bug.cgi?id=48007#c5 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1c98b1ecc69b6a2788ba26538edbc3edd486b3b2;p=tomcat7.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=48007#c5 Improve exception processing in CustomObjectInputStream#resolveClass(), to help find the cause behind BZ 48007. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@920912 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/util/CustomObjectInputStream.java b/java/org/apache/catalina/util/CustomObjectInputStream.java index ec5b3d4f4..543b65d0f 100644 --- a/java/org/apache/catalina/util/CustomObjectInputStream.java +++ b/java/org/apache/catalina/util/CustomObjectInputStream.java @@ -75,8 +75,14 @@ public final class CustomObjectInputStream try { return Class.forName(classDesc.getName(), false, classLoader); } catch (ClassNotFoundException e) { - // Try also the superclass because of primitive types - return super.resolveClass(classDesc); + try { + // Try also the superclass because of primitive types + return super.resolveClass(classDesc); + } catch (ClassNotFoundException e2) { + // Rethrow original exception, as it can have more information + // about why the class was not found. BZ 48007 + throw e; + } } }