I have an aspect that performs various calculations based on the data of the target method and therefore extracts them as follows:
@Around("execution(* com.xyz.service.AccountService.*(..))") public void validateParams(ProceedingJoinPoint joinPoint) throws Throwable { final MethodSignature signature = (MethodSignature) joinPoint.getSignature(); final String methodName = signature.getName(); final String[] parameterNames = signature.getParameterNames(); final Object[] arguments = joinPoint.getArgs(); ... ... ... joinPoint.proceed(); }
From the extracted details, all reflect the expected information, except for parameterNames, which always returns null. I expect it to return {accountDetails} according to the captions below. Does anyone know what I can lose, or is this a mistake?
Here is the signature of the target method I'm working with:
Long createAccount(RequestAccountDetails accountDetails);
source share