bayard 2004/09/29 23:21:40 Modified: lang/src/java/org/apache/commons/lang/exception ExceptionUtils.java NestableDelegate.java Log: Bug#30929. Shorn Tolley pointed out that using equals() means you can't pass SQLException in and expect to get back extensions of SQLException. Switching to isAssignableFrom allows you to do this. Revision Changes Path 1.40 +2 -2 jakarta-commons/lang/src/java/org/apache/commons/lang/exception/ExceptionUtils.java Index: ExceptionUtils.java =================================================================== RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/exception/ExceptionUtils.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- ExceptionUtils.java 4 Jul 2004 03:24:57 -0000 1.39 +++ ExceptionUtils.java 30 Sep 2004 06:21:40 -0000 1.40 @@ -434,7 +434,7 @@ return -1; } for (int i = fromIndex; i < throwables.length; i++) { - if (throwables[i].getClass().equals(type)) { + if (type.isAssignableFrom(throwables[i].getClass())) { return i; } } 1.24 +2 -2 jakarta-commons/lang/src/java/org/apache/commons/lang/exception/NestableDelegate.java Index: NestableDelegate.java =================================================================== RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/exception/NestableDelegate.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- NestableDelegate.java 18 Feb 2004 22:54:04 -0000 1.23 +++ NestableDelegate.java 30 Sep 2004 06:21:40 -0000 1.24 @@ -236,7 +236,7 @@ + fromIndex + " >= " + throwables.length); } for (int i = fromIndex; i < throwables.length; i++) { - if (throwables[i].getClass().equals(type)) { + if (type.isAssignableFrom(throwables[i].getClass())) { return i; } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]