Fixes usage of ReflectionUtils that can't access method; fixes gh-2267

This commit is contained in:
Marcin Grzejszczak
2023-03-08 19:13:20 +01:00
parent 5cd21ca511
commit 5cedfb4cb3

View File

@@ -79,7 +79,12 @@ public class TraceSessionRepositoryAspect {
if (log.isDebugEnabled()) {
log.debug("Found a corresponding method on the trace representation [" + method + "]");
}
return ReflectionUtils.invokeMethod(method, target, pjp.getArgs());
try {
return method.invoke(target, pjp.getArgs());
}
catch (Exception ex) {
ReflectionUtils.handleReflectionException(ex);
}
}
if (log.isDebugEnabled()) {
log.debug("Method [" + pjp.getSignature().getName()