Merge branch '6.2.x'

This commit is contained in:
Juergen Hoeller
2025-07-11 22:50:47 +02:00
13 changed files with 69 additions and 44 deletions
@@ -16,6 +16,7 @@
package org.springframework.aop.aspectj;
import java.lang.reflect.InaccessibleObjectException;
import java.lang.reflect.InvocationTargetException;
import org.jspecify.annotations.Nullable;
@@ -67,7 +68,7 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
throw new AopConfigException(
"Unable to instantiate aspect class: " + this.aspectClass.getName(), ex);
}
catch (IllegalAccessException ex) {
catch (IllegalAccessException | InaccessibleObjectException ex) {
throw new AopConfigException(
"Could not access aspect constructor: " + this.aspectClass.getName(), ex);
}
@@ -16,6 +16,7 @@
package org.springframework.aop.support;
import java.lang.reflect.InaccessibleObjectException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
@@ -366,7 +367,7 @@ public abstract class AopUtils {
throw new AopInvocationException("AOP configuration seems to be invalid: tried calling method [" +
method + "] on target [" + target + "]", ex);
}
catch (IllegalAccessException ex) {
catch (IllegalAccessException | InaccessibleObjectException ex) {
throw new AopInvocationException("Could not access method [" + method + "]", ex);
}
}