Bug 40805 - call pointcut with interface type fails if method declared on interface
Summary: call pointcut with interface type fails if method declared on interface
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Windows NT
: P2 normal (vote)
Target Milestone: 1.1.1   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard: Obsolete
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-25 20:19 EDT by Wes Isberg CLA
Modified: 2009-03-31 06:11 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Isberg CLA 2003-07-25 20:19:15 EDT
test case: tests/bugs/DeclareWarningAndInterfaceMethodCW.java

given interface I defining method void m(), then

  call(void I.m())

should pick out any call to that method in any type 
implementing that method, which it does unless
(here's the bug...) an aspect also declares the method:

    aspect A {
        void I.m(){}
    }

Related side note: 

If a class also implements the method:

    class C implements I {
        void m(){}
    }

This overrides the implementation declared in A,
just as it would a superclass method.  There is 
no conflict.
Comment 1 Jim Hugunin CLA 2003-08-04 17:06:05 EDT
This is a bug.  It is caused by ResolvedTypeX.getDeclaredMethods() not returning
methods that were defined by an aspect externally.  I still need to evaluate the
risk involved in fixing this for 1.1.1.
Comment 2 Jim Hugunin CLA 2003-08-04 20:21:28 EDT
This could be fixed in the obvious way by including methods from inter-type
declarations in those searched when doing call signature matching.  It is fixed
in the tree for 1.1.1.