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.

Bug 70852 - Auto Correct GeneralException
Summary: Auto Correct GeneralException
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-29 17:40 UTC by mfulgo
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mfulgo 2005-12-29 17:40:59 UTC
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.
Comment 1 Jan Becicka 2006-10-26 16:28:10 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 2 Quality Engineering 2007-09-20 12:50:37 UTC
Reorganization of java component