Replace isAssignableFrom() with isInstance() where feasible

Closes gh-36899

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
Yanming Zhou
2026-06-15 15:16:18 +02:00
committed by GitHub
parent 0c60266986
commit cdc3c52640
31 changed files with 37 additions and 47 deletions
@@ -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);
}
}