Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] AspectJ 1.6.4 bug on getParameterNames

Hi Andrew,
sorry for being vague but I was a bit in a hurry switching back to 1.6.3 :D

In this snippet :

MethodSignature sig = (MethodSignature)thisJoinPointStaticPart.getSignature(); Object[] args = thisJoinPoint.getArgs();
       Stirng[] names =  sig.getParameterNames());

I have names.length == 1 and args.length == 0. In fact, the join point method has zero arguments, so I suppose it is getParameterNames that is returning wrong data. getParameterTypes seems to be fine however.

I think we are talking about org.aspectj.lang.reflect.CodeSignature methods.

Simone


Andrew Eisenberg wrote:
I assume you are talking about IProgramElement.getParameterNames and
IProgramElement.getParameterTypes.  I am not sure why this is
happening.  It sounds like a bug, but this does sound like Andy's
area, so I'll let him answer that.

On Mon, May 11, 2009 at 8:10 AM, Simone Gianni <simoneg@xxxxxxxxxx> wrote:
Hi all,
since we have 1.6.4 in maven, we switched to it. Unfortunately however it
seems like if there is a bug on 1.6.4 regarding getParameterNames on a
method signature.

In fact, under 1.6.3, a method sigature with zero parameters returned a zero
length array on both getParameterNames and getParameterTypes and a zero
length array on getArgs on the corresponding joinpoint instance. On 1.6.4
getParameterNames returns an array of length 1 (in my case, containing
"arg0"), while all the others still return a zero length array.

I suppose this is a bug, if none of you have a clear idea of why this
happens I can try build a simple testcase.

Simone

--
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
http://www.simonegianni.it/

_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev

_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev


--
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
http://www.simonegianni.it/



Back to the top