Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] bug in ajc-generated pointcut annotations

Hi all,

when you compile an AspectJ program with Java 5 compatibility, ajc
generates annotations for the advice methods that contain the
corresponding pointcut definition.

I want to use these annotations and I assumed that they should reflect
the full pointcut definition. However, there are some differences to the
pointcut defined in the source. I guess that this is a bug, and I already have filed a bug for it (https://bugs.eclipse.org/bugs/show_bug.cgi?id=188291). Here is an example.

I am writing this email for two reasons: first, I'd like to get a confirmation that this is indeed a bug and I did not misunderstand the intention of the annotation. Second, I'd like to generate interest in this bug.

Pointcut in the source code:
pointcut pc() :
adviceexecution() || args(int[]) || if( 10 == 10);

That's what it turns to in the annotation:
(adviceexecution(* *) || (args(int) || if(void java.lang.Object.if_())))

I think, especially losing the array dimension of the type pattern (args PCD) is a dangerous bug. And I don't know the intended semantics for the if PCD. I assumed that it should contain the signature of the method generated for the if-expression in the source code. In my case this would be something like:

if(boolean Aspect1.ajc$if_113())

Otherwise, the if PCD in the annotation would be useless.

Best wishes,
Christoph

--
Dipl.-Inform. Christoph Bockisch    bockisch@xxxxxxxxxxxxxxxxxxxxxxxxxx
Software Technology Group           Phone:  ++49 (0) 6151-16-3608
Darmstadt University of Technology  Fax:    ++49 (0) 6151-16-5410
Hochschulstr. 10, 64289 Darmstadt, Germany
http://www.st.informatik.tu-darmstadt.de/



Back to the top