Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ajdt-dev] Some clues on Cross References - multiple around() advice not distinguished

The following aspect is giving me interesting behaviour:

 0 package x;
 1 public aspect OverrideOptions
 2 {
 3    /**
 4     * Comment A
 5     */
 6    boolean around() : execution( public boolean A.a() ) && this( A )
 7    {
 8        return false;
 9    }
10   
11    /**
12     * Comment B
13     */
14    int around() : execution(private int B.b(..)) && this(B){
15        return 0;
16    }
17 }

While the compiler is doing the right thing, the cross references view
gives some interesting behaviour.

When I open the aspect, the cursor is at the beginning of line 0, and
the CR view shows:
	x

As I move the cursor down (always at left edge), lines 1-3  give:
- OverrideOptions
  - around()
    - advises
      - B.b(boolean)
      - A.a()

Lines 4-6 give:
- around()
  - advises
    - B.b(boolean)
    - A.a()

Lines 7-16 give:
... Around()

And line 17 gives:
- OverrideOptions
  - around()
    - advises
      - B.b(boolean)
      - A.a()

Factoring out the first pointcut as a separate pointcut declaration
gives even more interesting behaviour.  The first advice now
successfully claims to advise both target classes, when before it was
none.

Version: 1.6.4.20090130154246
AspectJ version: 1.6.4.20090129145400
**********************************************************************
IMPORTANT NOTICE.
Confidentiality:  This e-mail and its attachments are intended for the above named only and may be confidential.  If they have come to you in error you must take no action based on them, nor must you copy or show them to anyone; please reply to this e-mail and highlight the error.
Security Warning:  Please note that this e-mail has been created in the knowledge that Internet e-mail is not a 100% secure communications medium.
We advise that you understand and observe this lack of security when e-mailing us.
Viruses:  Although we have taken steps to ensure that this e-mail and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free.
Monitoring and Scanning:  Cambridge Cognition has monitoring and scanning systems in place in relation to emails sent and received to: monitor / record business communications; prevent and detect crime; investigate the use of the Company's internal and external email system; and provide evidence of compliance with business practices.

Cambridge Cognition Limited
Company Registration Number 4338746
Registered address:
Tunbridge Court
Tunbridge Lane
Bottisham
Cambridge
CB25 9TU
UK
**********************************************************************



Back to the top