Bug 49371 - Pointcut call(* Foo.*(..)) does not capture calls to parent class methods
Summary: Pointcut call(* Foo.*(..)) does not capture calls to parent class methods
Status: RESOLVED DUPLICATE of bug 41952
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.1   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-28 22:55 EST by Paulo Villela CLA
Modified: 2004-01-07 04:32 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo Villela CLA 2003-12-28 22:55:17 EST
The pointcut call(* Foo.*(..)) captures calls to methods defined in class Foo 
but does not capture calls to parent class methods.  

For example, given a class Account which defines methods debit and credit (and 
inherits method toString from Object), the pointcut:
    
        call(* Account.*(..)) 

captures the second and third lines of the snippet below but not the call to 
toString() in the fourth:

        Account account = new Account(12456);
        account.credit(100);
        account.debit(50);
        System.out.println( account.toString() );

This behavior is highly undesirable as the join points captured by a "call" 
pointcut would silently change as a result of refactoring methods from a class 
to a parent class.
Comment 1 Jim Hugunin CLA 2004-01-07 04:32:37 EST
See bug 41952 for a fairly thorough explanation of what's going on here.

*** This bug has been marked as a duplicate of 41952 ***