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.
Development build #200606210200 of NetBeans 5.5 Windows XP, RC build #87 of JDK 1.6 Description: ============ To be honest I don't know what should be correct behaviour but on the other hand I don't know why IDE offers something that can't be used. I mean the fact that Java hints are available even in the guarded code of GUI forms. This obviously leads to strange situations and throws exceptions. Steps to reproduce: =================== 1. Create new Java application project and new JFrame class inside. 2. Select the JFrame in design mode, switch to "Events" properties and generate e.g. "formAncestorMoved" event handler method. 3. Type the following code to its body: throw new Exception(); 4. After a while you are allowed to press ALT+Enter. Use "Add throws clause..." hint. The statement will be added to method signature and you now can't delete it. Only "Edit|Undo" works. 5. Use error stripe to move to another syntax error in "Generated Code" fold. 6. Use ALT+Enter again but choose "Surround with try-catch block" hint now. 7. Below attached exception will be thrown.
Created attachment 31264 [details] Exception thrown when "Surround with ..." Java hint is used in guarded code
Reassigning to java module for evaluation.
Javacore module was replaced by Retouche infrastructure. This bug is not valid in trunk any more.
Reorganization of java component