Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329111

Summary: [handles] Handle problem when declares share a counter
Product: [Tools] AspectJ Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: AJBrowserAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aclement
Version: unspecified   
Target Milestone: 1.6.11   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Andrew Eisenberg CLA 2010-10-29 16:33:49 EDT
In this aspect:

public aspect AJ {

	class X{}
	interface Y {}
	
	declare parents : X implements Y;
	declare soft : Exception : execution(void x());
	 
	void x() {
		throw new Exception();
	}
}

The JDT handle for the declare soft is:
=ITDTesting/src<{AJ.aj'AJ`declare soft

but the AJ handle is:
=ITDTesting/src<*AJ.aj'AJ`declare soft!2

(you can ignore the * and { difference because that is an artifact of JDT weaving)

It looks like the count is being incremented because of the declare parents, but it should not be.
Comment 1 Andrew Clement CLA 2010-10-29 19:08:42 EDT
fixed.  fix is in AJDT too.
Comment 2 Andrew Eisenberg CLA 2010-10-30 00:56:22 EDT
The fix for this problem has uncovered two similar problems with declare warning and declare error.  They also have invalid counts in them.  They appear to be incrementing based on the count of declare parents (just like declare soft).
Comment 3 Andrew Clement CLA 2010-10-30 14:36:12 EDT
changed the title as you want it to cover more than declare parents now.  Prior to the change for this bugzilla the only one defined to not share a counter was declare annotation.
Comment 4 Andrew Eisenberg CLA 2010-10-30 18:47:26 EDT
That's correct.  All declare declaration kinds should have their own counter.  The only reason that a handle identifier will have a counter is to distinguish it from an otherwise identical handle identifier.
Comment 5 Andrew Clement CLA 2010-10-30 20:29:59 EDT
of course.  I am just surprised this only came up now and not long ago.
Comment 6 Andrew Clement CLA 2010-10-31 13:31:24 EDT
fixed