getCause(Throwable): Perform a softer check on the return type of the

argument's getCause() method, doing isAssignableFrom() instead of a
hard memory address comparison.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136962 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Rall 2002-08-13 18:17:39 +00:00
parent 6053ce341f
commit d5525cc4c0
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ public class ExceptionUtils
{ {
} }
if (getCause != null && getCause.getReturnType() == Throwable.class) if (getCause != null &&
Throwable.class.isAssignableFrom(getCause.getReturnType()))
{ {
try try
{ {