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 79564

Summary: SurroundWithTryCatch to put declarations above try
Product: java Reporter: ivan <ivan>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description ivan 2006-07-03 07:47:06 UTC
If you have code like this:
    Process p = ProcessBuilder.start();
and you want to put it in a try block the right result is
    Process p = null;
    try {
        p = ProcessBuilder.start();
    ... ...

Would it be possible for the SurroundWithTryCatch action to be smart
enough to detect the declaration and pull it out and above the try?