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

Bug 427430

Summary: HCR drops too many frames for multiple anonymous types defined in class
Product: [Eclipse Project] JDT Reporter: Michael Rennie <Michael_Rennie>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: xman.augs
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Rennie CLA 2014-02-05 00:38:45 EST
FUP to bug 409023.

snippet from bug 409023:

package application;

public class TestHCR1 {
	Runnable run1 = new Runnable() { // Anonymous class initializer
		public void run() {
			System.out.println("Test run1 : run");
			run2.run();
		}
	};
	
	Runnable run2 = new Runnable() { // Anonymous class initializer
		public void run() {
			// changing the content of this function during the debugging
			// will cause that many frames will be dropped and the program will continue
			// from the start of the (run1.run) method
			System.out.println("Test run2 : run");
			System.out.println("Test run2: completed");
		}
	};
	
	public TestHCR1() {
		
	}
	
	public void test() {
		run1.run();
	}
	
	public static void main(String[] args) {
		new TestHCR1().test();
	}
}

proposed fix + tests are provided in: https://bugs.eclipse.org/bugs/attachment.cgi?id=239311

Jacob, can you sign the CLA so I can review / apply your fix?

http://wiki.eclipse.org/Development_Resources/Contributing_via_Git#Eclipse_Foundation_Contributor_License_Agreement
Comment 1 Michael Rennie CLA 2014-05-20 10:08:22 EDT
Jacob opened a new bug for the fix, marking as a dupe of it.

*** This bug has been marked as a duplicate of bug 434695 ***