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:
parent
3e5b0bd6a0
commit
13fecb8398
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue