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

Bug 184941

Summary: [breakpoints] Setting watchpoint on anonymous field removes existing breakpoint
Product: [Eclipse Project] JDT Reporter: Michael Rennie <Michael_Rennie>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Michael Rennie CLA 2007-05-01 14:13:27 EDT
if you have an anonymous inner type that has a field with the same name as one in the enclosing type (which has a watchpoint on it), settting a watchpoint on the field in the anonymous type will remove the watchpoint on the enclosing type.

Steps:
1. create a class with a private field 'number', and set a watchpoint on it
2. create an anonmyous inner type with a private field 'number'
3. try to seta watchpoint on the 'number' field of the anonymous inner type

Expected:
a watchpoint gets set on the 'number' field of the anonymous inner type

Happens:
the watchpoint from the enclosing type 'number' field is removed

Test program that demonstrates the problem

package a;

public class Refactoree {
	private int number = 0; // set watchpoint
	
	private Runnable runnable = new Runnable() {
		private int number = 1;  //try to set watchpoint
		public void run() {
			System.out.println("anonymous");
		};
	};
}
Comment 1 Eclipse Genie CLA 2019-03-20 10:46:26 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.