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.
Steps to reproduce: 1. Create new project. 2. Create new class. 3. add "extends Exception" 4. Press Alt+Insert and choose "Constructor" in generate dialog. 5. Tick all 4 checkboxes. 6. Take a look at the generated code. NetBeans 6.8 generated corresponding invocations to super, like super(message). NetBeans 6.9 leaves empty constructors.
Unfortunately, I cannot reproduce the problem. Could you please attach your messages.log file? Thanks
Created attachment 100310 [details] messages.log file, as requested Here is my messages.log. Just started NetBeans, reproduced the problem, and closed NetBeans again.
Just performed more experiments and found magic combination. The same worked with NetBeans 6.8 but broken in 6.9. Details: 1. # mkdir ~/temp/netbeans69 2. # /opt/netbeans-6.9/bin/netbeans --userdir /home/user/temp/netbeans69 3. Do not import settings from previous installation 4. New project - Java Application, Finish. 5. Create new class BaseException. 6. Close netbeans. 7. # /opt/netbeans-6.9/bin/netbeans --userdir /home/user/temp/netbeans69 8. write "extends Exception " just before { in BaseException class. 9. move the cursor just after { on the same line as "public class BaseException extends Exception". 10. Press Alt+Insert. 11. Constructor. 12. Tick all 4 checkboxes. 13. Press enter. You'll see 4 absolutely empty constructors, without super(...) invocations. Reproducable every time for me.
More system configuration details: OpenSUSE 11.2 x86_64, KDE4 installation, Sun Java installed into /opt/jdk1.6.0_20. # java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
Unfortunately, I still cannot reproduce it. Is the problem reproducible on your side even without restarting NetBeans (steps 6 nad 7 in your scenario)? Thanks.
Could you also run your NetBeans with -J-Dorg.netbeans.api.java.source.ElementHandle.level=FINE and check the log file for any suspicious messages?
Created attachment 100327 [details] last lines from messages.log with logging enabled
No, the bug is not reproducable if NetBeans was not restarted after project was created.
Created attachment 100354 [details] Patched java.source module
I have added some additional logging into the java.source module. Could you please download attached jar file, save it into the java/modules subdirectory of your NB installation directory, reproduce the issue and attach the new messages.log to the issue? Thanks.
Created attachment 100359 [details] messages.log with more logging Done. In logs it looks fine, but in editor - completely another story. Maybe I'll try to capture a video-screenshot?
When running under debugger I managed to reproduce the issue. The problem is in "random" setting of the newly created trees start positions. Should be fixed in current dev build together with issue #185967.
Thank you!
*** Bug 189555 has been marked as a duplicate of this bug. ***