diff options
author | aclement <aclement> | 2008-08-22 22:09:18 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-08-22 22:09:18 +0000 |
commit | 7aef243f67f9cdcac4bc6abc5eadb59a9f9700c6 (patch) | |
tree | 7b3ffa2a6ff2bd495aa8ea744e0a34579b99d180 /tests/bugs162 | |
parent | d0d65ce7c4a156ccd7e5dcd9bc72a61b853a32f9 (diff) | |
download | aspectj-7aef243f67f9cdcac4bc6abc5eadb59a9f9700c6.tar.gz aspectj-7aef243f67f9cdcac4bc6abc5eadb59a9f9700c6.zip |
176905: test and fix
Diffstat (limited to 'tests/bugs162')
-rw-r--r-- | tests/bugs162/pr176905/ChainedItd.aj | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs162/pr176905/ChainedItd.aj b/tests/bugs162/pr176905/ChainedItd.aj new file mode 100644 index 000000000..441cf7057 --- /dev/null +++ b/tests/bugs162/pr176905/ChainedItd.aj @@ -0,0 +1,24 @@ +import java.lang.reflect.Field; +import java.lang.annotation.*; + +public aspect ChainedItd { + declare @field: long *.foo: @Deprecated; + + declare @field: @Deprecated * *.foo: @MyAnnotation; + //uncomment the line below to prove our test should work + //declare @field: long *.foo: @MyAnnotation; + + public static void main(String argz[]) throws Exception { + Field idField = Test.class.getDeclaredField("foo"); + idField.setAccessible(true); + assert idField.getAnnotation(MyAnnotation.class) != null; + } +} + +class Test { + private long foo; +} + +@Retention(RetentionPolicy.RUNTIME) +@interface MyAnnotation { +} |