This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | NB erroneously attempts to create a FieldBreakpoint instead of a Line breakpoint on an anonymous inner class | ||
---|---|---|---|
Product: | debugger | Reporter: | swpalmer <swpalmer> |
Component: | Java | Assignee: | Martin Entlicher <mentlicher> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | mmirilovic |
Priority: | P2 | Keywords: | REGRESSION |
Version: | 7.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
can't set breakpoint on line 20
better example |
Description
swpalmer
2012-06-19 15:55:32 UTC
Well, I'm playing with various anonymous PropertyChangeListeners and I;m not able to reproduce the issue. Clicking gives me just an ordinary line breakpoint. Both inside the propertyChange() method and on the pluginDetailsListener = new PropertyChangeListener() { ... line. I've tested in both ANT and Maven Java projects. Can you please provide a code sample, which manifests this bug? Created attachment 121234 [details]
can't set breakpoint on line 20
Sample project attached. Can't set a breakpoint on line 20 Can for lines 31,32 This is very similar to the original report, but in it somehow a field breakpoint got configured - which always failed to get created at runtime. In any case, the common thing is that the line in the PropertyChangeListener refuses to have a breakpoint set on it. Note that the supplied project is so simplified that it makes no sense to set a breakpoint because none of the code actually runs. The point is that the breakpoint can't even be set prior to running code, even in cases where the code will run. I replaced the example with one that is more runnable You can set a breakpoint on line 46, but not on line 22. At runtime I get: Listening on javadebug User program running LineBreakpoint BreakPointBug.java : 46 successfully submitted. Not able to submit breakpoint FieldBreakpoint bug.report.BreakPointBug$1.computeReadyListener, reason: Field 'computeReadyListener' does not exist in class bug.report.BreakPointBug$1. Breakpoint hit at line 46 in class bug.report.BreakPointBug by thread AWT-EventQueue-0. Thread AWT-EventQueue-0 stopped at BreakPointBug.java:46. Created attachment 121236 [details]
better example
Latest tests were with build 201206220002 The example is Ant-based. I tried to make a Maven project for a test case, but creating a new Maven project is broken in build 201206220002 - separate issue already opened. Thanks for the example, I've reproduced the bug. Unfortunately, this is a regression, the line breakpoints work fine in this case in 7.1. Fixed by changeset: 225017:2173f5b2994e http://hg.netbeans.org/main/rev/2173f5b2994e Let's have this fixed in 7.2 then. Thanks Scott for the repro steps! Integrated into 'main-golden', will be available in build *201206260002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2173f5b2994e User: mentlicher@netbeans.org Log: #214455: Stop searching for a field when we're in a method body. Product Version: NetBeans IDE Dev (Build 201206260002) Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21 System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb) User directory: /home/cesilko/.netbeans/dev Cache directory: /home/cesilko/.cache/netbeans/dev Verified in today's trunk build. Please integrate the fix to release72 branch. Thanks! It's pushed into release72 as changeset: 232264:e81fe7a04ec7 http://hg.netbeans.org/releases/rev/e81fe7a04ec7 Integrated into 'releases', will be available in build *201206262201* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/e81fe7a04ec7 User: mentlicher@netbeans.org Log: #214455: Stop searching for a field when we're in a method body. (transplanted from 2173f5b2994e5d8b5eb073006631ee421963bfb7) Product Version: NetBeans IDE 7.2 RC1 (Build 201206262201) Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21 System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb) User directory: /home/cesilko/.netbeans/7.2rc1 Cache directory: /home/cesilko/.cache/netbeans/7.2rc1 Verified. |