getCauseUsingWellKnownTypes(Throwable): Collapsed checks for

instanceof NestableException and NestableRuntimeException into single
check for Nestable interface.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Rall 2002-08-21 07:13:50 +00:00
parent 3e5b0bd6a0
commit 13fecb8398
1 changed files with 2 additions and 6 deletions

View File

@ -176,13 +176,9 @@ public class ExceptionUtils
*/ */
private static Throwable getCauseUsingWellKnownTypes(Throwable t) private static Throwable getCauseUsingWellKnownTypes(Throwable t)
{ {
if (t instanceof NestableException) if (t instanceof Nestable)
{ {
return ((NestableException) t).getCause(); return ((Nestable) t).getCause();
}
else if (t instanceof NestableRuntimeException)
{
return ((NestableRuntimeException) t).getCause();
} }
else if (t instanceof SQLException) else if (t instanceof SQLException)
{ {