Bug 102160 - [compiler][1.5] Only first error is reported on circularity references between annotations
Summary: [compiler][1.5] Only first error is reported on circularity references betwee...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-29 11:06 EDT by Maxime Daniel CLA
Modified: 2006-03-27 10:18 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.