Bug 276399 - incremental build leaves relationship hanging around in the model
Summary: incremental build leaves relationship hanging around in the model
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows NT
: P2 normal (vote)
Target Milestone: 1.6.5   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-14 19:40 EDT by Andrew Clement CLA
Modified: 2009-05-15 02:20 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2009-05-14 19:40:07 EDT
I've seen a few manifestations of this problem I think:

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
@interface WebService {}

//@WebService 
class Foo {
	
	public Foo() {}
	
}
aspect X {
	
	after(): execution(*.new(..)) && @within(WebService) {
		
	}
}

uncomment the annotation and the advice applies (arrows appear OK), comment it out again and save - on the incremental build 'something' happens but not the right thing as the relationship is still in the relationship map.  In the UI the arrow against the method changes to a straight arrow from the after arrow.
Comment 1 Andrew Clement CLA 2009-05-15 00:21:31 EDT
on trying to create a testcase, it just passed for me... on further digging it will only fail if source folders are used in my testcase.
Comment 2 Andrew Clement CLA 2009-05-15 00:42:30 EDT
aha, the conditions are: the test program is in the default package and source folders are used.  In one place the default package is considered to be the value 'null' whilst in another it is considered to be the empty string "".  This difference prevents the type being found in the model on the inc build so the relationship removed.

Comment 3 Andrew Clement CLA 2009-05-15 02:20:32 EDT
test and fix committed