| Summary: | BadLocationException from ToggleBreakpointAdapter when trying to toggle watchpoint | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | Debug | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie |
| Version: | 3.7 | ||
| Target Milestone: | 3.8 M6 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Markus Keller
Simpler example:
package xy;
public class Try {
private final String fWorkingValues; // Breakpoint here
Try() {
fWorkingValues= null;
System.out.println(fWorkingValues);
}
}
We end up falling back to setting a line breakpoint on the next valid line (since you can't set a watchpoint on a final field), the problem is that we do not have a validator when we invoke toggleBreakpoints, so we are guessing the wrong location. There was even a bit more to it - we were creating two jobs in place of one, passing a bogus value for a line number and allowing final field to be found as valid locations for watchpoints in our AST visitor. Pushed fix to: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=20b68383657cd467297bd15f92d8b6233809a6c0 |