Bug 344326 - Any change in class that calls an inner class method causes recompilation in all referencing classes
Summary: Any change in class that calls an inner class method causes recompilation in ...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: IDE (show other bugs)
Version: 1.6.11   Edit
Hardware: PC Linux
: P2 major with 2 votes (vote)
Target Milestone: 1.6.12   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-29 14:00 EDT by Jonathan Su CLA
Modified: 2011-05-03 10:43 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Su CLA 2011-04-29 14:00:57 EDT
User group discussion: http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg12862.html

As the title described, we seem to have narrowed down the problem. Given the following three classes:


package foo;

public class ClassReferencingTestClass {

	public void test() {
		new TestClass().callInner();
	}
}
 


------------


package foo;

public class TestClass { 
    
	public boolean callInner() {
		return new TestClassWithInner.InnerTest().getTest();
	}
}



------------


package foo;

public class TestClassWithInner {
  
	public static class InnerTest{
		public boolean getTest() {
			return true; 
		}
	}
}




Any change in "TestClass" causes recompilation of that class as well as any referencing class such as "ClassReferencingTestClass". Note that there are no aspects that have the scope to advise any of these three classes' methods.


Following is the AJDT event trace:

21:10:16 Startup information: 
   AJDT version: 2.1.2.e36x-20110307-1000 for Eclipse 3.6
   AspectJ Compiler version: 1.6.11.RC1
   usingVisualiser=true
   usingXref=true
   usingCUprovider=true
   org.aspectj.ajdt.core.compiler.weaver.XNoInline = true
   ajde.version.at.previous.startup = @AJDEVERSION@
   org.aspectj.ajdt.core.compiler.problem.suppressWarnings = enabled 
   org.eclipse.ajdt.internal.ui.tracing.checked.filters = set: Compiler,Builder
   org.aspectj.ajdt.core.compiler.lint.adviceDidNotMatch = ignore

10:48:4 ===========================================================================================
10:48:4 Build kind = AUTOBUILD
10:48:4 Project=<project>, kind of build requested=Incremental AspectJ compilation
10:48:4 Timer event: 0ms: Flush included source file cache
10:48:4 Timer event: 7ms: Check delta
10:48:4 File: /path/to/foo/TestClass.java has changed.
10:48:4 build: Examined delta - 1 changed, 0 added, and 0 deleted source files in required project <project>
10:48:4 Timer event: 9ms: Looking for and marking configuration changes in <project>
10:48:4 	Configuration changes found: true
10:48:4 Timer event: 9ms: Look for source/resource changes
10:48:4 Setting list of classpath elements with modified contents:
10:48:4       []
10:48:4 Timer event: 23ms: Pre compile
10:48:4 Sending the following configuration changes to the compiler: []
10:48:4 1 source file changes since last build
10:48:4 Compiler configuration for project <project> has been read by compiler.  Resetting.
10:48:4      Configuration was []
10:48:4 Resetting list of modified source files.  Was [/path/to/foo/TestClass.java]
10:48:4 Preparing for build: planning to be an incremental build
10:48:4 Starting incremental compilation loop 1 of possibly 5
10:48:4 Timer event: 106ms: Time to first compiled message
10:48:4 Timer event: 110ms: Time to first woven message
10:48:4 Examining whether any other files now need compilation based on just compiling: '{/path/to/foo/TestClass.java}'
10:48:4 Need to recompile 'ClassReferencingTestClass.java'
10:48:4 Starting incremental compilation loop 2 of possibly 5
10:48:4 Examining whether any other files now need compilation based on just compiling: '{/path/to/foo/ClassReferencingTestClass.java,/path/to/foo/TestClass.java}'
10:48:4 AspectJ reports build successful, build was: INCREMENTAL
10:48:4 AJDE Callback: finish. Was full build: false
10:48:4 Timer event: 223ms: Total time spent in AJDE
10:48:4 Timer event: 0ms: Refresh after build
10:48:4 Types affected during build = 2
10:48:4 Timer event: 247ms: Total time spent in AJBuilder.build()
10:48:4 Timer event: 0ms: Delete markers: <project>(Finished deleting markers for <project>)
10:48:4 Timer event: 0ms: Create markers: <project> (Finished creating markers for <project>)
10:48:4 Created 0 markers in 2 files
10:48:4 Timer event: 27ms: Update visualizer, xref, advice listeners for (separate thread): <project>
Comment 1 Andrew Clement CLA 2011-05-02 11:45:29 EDT
fixes are in, should be in an AJDT dev build later today - I'll comment again when it is available for install.

thanks for the clear mini testcase, very helpful.
Comment 2 Andrew Clement CLA 2011-05-02 14:28:40 EDT
build should be available now on 3.6.  Update site:

http://download.eclipse.org/tools/ajdt/36/dev/update
Comment 3 Jonathan Su CLA 2011-05-02 15:42:08 EDT
Hi Andy,

I just grabbed the dev build, uninstalled previous AJDT version and installed the new build. I can confirm that the issues we were seeing before have been fixed now.

Thanks you very much for the prompt fix!

Jonathan
Comment 4 Andrew Clement CLA 2011-05-03 10:43:45 EDT
thanks for confirming