diff options
author | Andy Clement <aclement@vmware.com> | 2012-03-02 08:17:44 -0800 |
---|---|---|
committer | Andy Clement <aclement@vmware.com> | 2012-03-02 08:17:44 -0800 |
commit | f37c56e02982a1043e7821bf033b58495f8a6b74 (patch) | |
tree | 929ae23ef3663a073ed2f7e451faf52648386578 /tests/bugs170 | |
parent | 548f8b6a118d06874d511ffcc13602b4ec756d9a (diff) | |
download | aspectj-f37c56e02982a1043e7821bf033b58495f8a6b74.tar.gz aspectj-f37c56e02982a1043e7821bf033b58495f8a6b74.zip |
fix for 371998
Use resolved type pattern rather than re-resolving
Diffstat (limited to 'tests/bugs170')
-rw-r--r-- | tests/bugs170/pr371998/AspectTest.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/bugs170/pr371998/AspectTest.java b/tests/bugs170/pr371998/AspectTest.java new file mode 100644 index 000000000..38bc68ee2 --- /dev/null +++ b/tests/bugs170/pr371998/AspectTest.java @@ -0,0 +1,32 @@ +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.DeclareParents; + +@Aspect +public class AspectTest { + + public AspectTest() {} + + @DeclareParents(value="java.lang.Runnable+ || java.util.concurrent.Callable+", defaultImpl=XImpl.class) + //@DeclareParents(value="java.lang.Runnable+", defaultImpl=XImpl.class) + private X xImpl; + + public static void main(String []argv) { + ((X)new Foo()).xxx(); + ((X)new Bar()).xxx(); + } + +} + interface X { void xxx();} + class XImpl implements X { + public XImpl() {} + public void xxx() {} + } + + +class Foo implements Runnable { + public void run() {} +} + +class Bar implements java.util.concurrent.Callable { + public Object call() {return null;} +} |