From 09123def57edf9a216bba111acac3d5ce21dd5f1 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 28 Jun 2024 11:36:17 +0200 Subject: [PATCH] Detect ajc markers in superclasses as well (for weaving check) Closes gh-33113 (cherry picked from commit 100da83913884510103423d54257c37f2a428792) --- .../springframework/aop/aspectj/AspectJExpressionPointcut.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java index 97a1a5db8ae8..c83d6e1406cd 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java @@ -545,7 +545,8 @@ private static boolean compiledByAjc(Class clazz) { return true; } } - return false; + Class superclass = clazz.getSuperclass(); + return (superclass != null && compiledByAjc(superclass)); }