mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Replace isAssignableFrom() with isInstance() where feasible
Closes gh-36899 Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice
|
||||
* is only invoked if the thrown exception is a subtype of the given throwing type.
|
||||
*/
|
||||
private boolean shouldInvokeOnThrowing(Throwable ex) {
|
||||
return getDiscoveredThrowingType().isAssignableFrom(ex.getClass());
|
||||
return getDiscoveredThrowingType().isInstance(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user