当前位置: 动力学知识库 > 问答 > 编程问答 >

java - AspectJ ProceedingJoinPoint.getArgs when method args are null

问题描述:

I was looking at the Javadocs for ProceedingJoinPoint/JoinPoint in AspectJ, but they don't seem to tell me what the expected behavior is for method getArgs is when null values are passed as one or more of the arguments. I am assuming I will get a value for each defined parameter, including nulls when appropriate.

网友答案:

Yes, you will get back a null for the appropriate indexed argument value:

for eg, if the your 2nd argument is null calling pjp.getArgs()[1] will return null.

分享给朋友:
您可能感兴趣的文章:
随机阅读: