|
|
|
@ -16,6 +16,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.springframework.context.event; |
|
|
|
package org.springframework.context.event; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.lang.reflect.InaccessibleObjectException; |
|
|
|
import java.lang.reflect.InvocationTargetException; |
|
|
|
import java.lang.reflect.InvocationTargetException; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
import java.lang.reflect.Proxy; |
|
|
|
import java.lang.reflect.Proxy; |
|
|
|
@ -374,8 +375,8 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ReflectionUtils.makeAccessible(this.method); |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
ReflectionUtils.makeAccessible(this.method); |
|
|
|
if (KotlinDetector.isSuspendingFunction(this.method)) { |
|
|
|
if (KotlinDetector.isSuspendingFunction(this.method)) { |
|
|
|
return CoroutinesUtils.invokeSuspendingFunction(this.method, bean, args); |
|
|
|
return CoroutinesUtils.invokeSuspendingFunction(this.method, bean, args); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -385,7 +386,7 @@ public class ApplicationListenerMethodAdapter implements GenericApplicationListe |
|
|
|
assertTargetBean(this.method, bean, args); |
|
|
|
assertTargetBean(this.method, bean, args); |
|
|
|
throw new IllegalStateException(getInvocationErrorMessage(bean, ex.getMessage(), args), ex); |
|
|
|
throw new IllegalStateException(getInvocationErrorMessage(bean, ex.getMessage(), args), ex); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (IllegalAccessException ex) { |
|
|
|
catch (IllegalAccessException | InaccessibleObjectException ex) { |
|
|
|
throw new IllegalStateException(getInvocationErrorMessage(bean, ex.getMessage(), args), ex); |
|
|
|
throw new IllegalStateException(getInvocationErrorMessage(bean, ex.getMessage(), args), ex); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (InvocationTargetException ex) { |
|
|
|
catch (InvocationTargetException ex) { |
|
|
|
|