From 13fecb8398f8f6e87d88a9c98626dae1a3c62f1b Mon Sep 17 00:00:00 2001 From: Daniel Rall Date: Wed, 21 Aug 2002 07:13:50 +0000 Subject: [PATCH] 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 --- .../org/apache/commons/lang/exception/ExceptionUtils.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/commons/lang/exception/ExceptionUtils.java b/src/java/org/apache/commons/lang/exception/ExceptionUtils.java index 5ea5386d8..1ddf866b7 100644 --- a/src/java/org/apache/commons/lang/exception/ExceptionUtils.java +++ b/src/java/org/apache/commons/lang/exception/ExceptionUtils.java @@ -176,13 +176,9 @@ public class ExceptionUtils */ private static Throwable getCauseUsingWellKnownTypes(Throwable t) { - if (t instanceof NestableException) + if (t instanceof Nestable) { - return ((NestableException) t).getCause(); - } - else if (t instanceof NestableRuntimeException) - { - return ((NestableRuntimeException) t).getCause(); + return ((Nestable) t).getCause(); } else if (t instanceof SQLException) {