From 7aef243f67f9cdcac4bc6abc5eadb59a9f9700c6 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 22 Aug 2008 22:09:18 +0000 Subject: 176905: test and fix --- tests/bugs162/pr176905/ChainedItd.aj | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/bugs162/pr176905/ChainedItd.aj (limited to 'tests/bugs162') 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 { +} -- cgit v1.2.3