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.
When right clicking the auto-correct lightbulb, and going to Surround with try-catch, the following error is thrown: org.netbeans.modules.javacore.jmiimpl.javamodel.GeneralException: Cannot surround guarded block with try-catch. at org.netbeans.modules.javacore.TryWrapper.<init>(TryWrapper.java:63) at org.netbeans.modules.java.hints.TryWrapperJavaHint.implement(TryWrapperJavaHint.java:58) at org.netbeans.modules.editor.hints.HintsUI$1.run(HintsUI.java:334) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:471) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:904) The code that this is performed on is as follows: private JFileChooser fc = new JFileChooser("/"); private JTextField directory = new JTextField(); private void browse_BTNActionPerformed(java.awt.event.ActionEvent evt) { if(fc.showOpenDialog(this) == fc.APPROVE_OPTION){ directory.setText(fc.getSelectedFile().getCanonicalPath()); } } where this is the action method for a form's button and the 'directory.set...." is the line being corrected.
Javacore module was replaced by Retouche infrastructure. This bug is not valid in trunk any more.
Reorganization of java component