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.
Product Version: NetBeans IDE Dev (Build 200909081533) Java: 1.5.0_20-rev; Java HotSpot(TM) Client VM 1.5.0_20-rev-b03 System: Linux version 2.6.28-15-generic running on i386; UTF-8; en_US (nb) And jdk 1.6.0_16 1) Open attached source file 2) Put cursor on line 37 3) Invoke New Breakpoint 4) select Method breakpoint (all methods of given class checkbox is selected) 5) confirm breakpoint and debug file 6) invoke Continue several times In JDK 1.6 the debugger stops (among others) on line 32 (public class MemoryView extends Helper { ), but in jdk 1.5 it does not stop on this line.
Created attachment 87500 [details] Test project to reproduce the testcase (open file MemoryView.java)
When the attached project is compiled using jdk 1.6, the compiler adds so called "bridge method" in MemoryView class. It is a synthetic method which delegates to 'test' method in Helper super class. I do not know, why the bridge method is generated in this case, it should be related to generics only. I would also expect that jdk 1.5 and jdk 1.6 produce the same bridge methods, so I do not know why there is a difference. Nevertheless, it is unwanted and confusing to stop in such methods (the current line does not appear in method 'test', but rather at MemoryView class declaration, line 32). I have added a check that excludes bridge methods to be targets of "stop in all methods" method breakpoint. http://hg.netbeans.org/main/rev/9c9500c96998
Integrated into 'main-golden', will be available in build *200910091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/9c9500c96998 User: Daniel Prusa <dprusa@netbeans.org> Log: #172027: "all methods" method breakpoint does not stop on the same lines in jdk 1.5 and 1.6
Verified in trunk build (200910100201).