Bug 102160

Summary: [compiler][1.5] Only first error is reported on circularity references between annotations
Product: [Eclipse Project] JDT Reporter: Maxime Daniel <maxime_daniel>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Maxime Daniel CLA 2005-06-29 11:06:02 EDT
Eclipse 3.1

The following source:
public @interface A {
	A circular1(); 				// (a1)
	B circular2();				// (a2)
}

@interface B {
	A circular2();				// (b)
}

gets circularity errors reported on lines a1 and b (line a2 is missing).
Commenting out line a1 allows to get the error on line a2.
Swapping lines a1 and a2 like below still gets a single error reported on A,
line a2 (which means the compiler only reports the first of such errors for a
given annotation type definition into a considered compilation unit, and that
moreover the depth of the cycle does not influence which error gets picked up.)

public @interface A {
	B circular2();				// (a2)
	A circular1(); 				// (a1)
}

@interface B {
	A circular2();				// (b)
}
Comment 1 Maxime Daniel CLA 2006-01-27 07:42:21 EST
Also, seems to me that 'in between' in the message 'Cycle detected: a cycle exists in between annotation attributes of B and A' should be replaced by 'between'.
Comment 2 Kent Johnson CLA 2006-02-24 13:00:22 EST
Added AnnotationTest 193

And changed the error message
Comment 3 Frederic Fusier CLA 2006-03-27 10:18:55 EST
Verified for 3.2 M6 using warm-up build I20060327-0010.