View | Details | Raw Unified | Return to bug 176905
Collapse All | Expand All

(-)src/org/aspectj/systemtest/ajc160/Ajc160Tests.java (+3 lines)
Lines 143-148 Link Here
143
		runTest("Suppress warnings2");
143
		runTest("Suppress warnings2");
144
	}
144
	}
145
 
145
 
146
	public void testChainedItds() {
147
		runTest("Chained itds");
148
	}
146
  /////////////////////////////////////////
149
  /////////////////////////////////////////
147
  public static Test suite() {
150
  public static Test suite() {
148
    return XMLBasedAjcTestCase.loadSuite(Ajc160Tests.class);
151
    return XMLBasedAjcTestCase.loadSuite(Ajc160Tests.class);
(-)src/org/aspectj/systemtest/ajc160/ajc160.xml (+12 lines)
Lines 140-145 Link Here
140
    </ajc-test>
140
    </ajc-test>
141
    
141
    
142
    
142
    
143
    <ajc-test dir="bugs160/pr176905"
144
      title="Chained itds"
145
      keywords="java5, itd, pr176905">
146
        <compile options="-1.5"
147
            files="ChainedItd.aj"
148
        >
149
        </compile>    
150
        <run class="ChainedItd">
151
            <stderr/> <!-- no errors-->
152
        </run>
153
    </ajc-test>
154
      
143
 <!-- second section - need a 1.6 vm -->
155
 <!-- second section - need a 1.6 vm -->
144
156
145
</suite>
157
</suite>
(-)bugs160/pr176905/ChainedItd.aj (+24 lines)
Added Link Here
1
import java.lang.reflect.Field;
2
import java.lang.annotation.*;
3
4
public aspect ChainedItd {
5
    declare @field: long *.foo: @Deprecated;
6
    
7
    declare @field: @Deprecated * *.foo: @MyAnnotation;
8
    //uncomment the line below to prove our test should work
9
    //declare @field: long *.foo: @MyAnnotation;
10
    
11
    public static void main(String argz[]) throws Exception {
12
		Field idField = Test.class.getDeclaredField("foo");
13
		idField.setAccessible(true);
14
		assert idField.getAnnotation(MyAnnotation.class) != null;
15
    }    
16
}	 
17
18
class Test {
19
    private long foo;
20
}
21
22
@Retention(RetentionPolicy.RUNTIME)
23
@interface MyAnnotation {
24
}

Return to bug 176905