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 113268

Summary: no quick-fix provided for unitialized local variable
Product: java Reporter: _ gsporar <gsporar>
Component: UnsupportedAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ gsporar 2007-08-21 01:04:57 UTC
Running the daily build from 2007-08-20.  My method looks like this:

    private static void method() {
        int i;
        while (true) {
            System.out.println(i++);
        }
    }

The IDE correctly displays an error indicating that the variable i is uninitialized.

But there is no quick-fix to change 

  int i;

to 

  int i = 0;

This is a regression from NB 5.5, which did provide a quick-fix.
Comment 1 Tomas Zezula 2007-09-04 18:05:07 UTC
Checking in src/org/netbeans/modules/java/hints/errors/Bundle.properties;
/cvs/java/hints/src/org/netbeans/modules/java/hints/errors/Bundle.properties,v  <--  Bundle.properties
new revision: 1.6; previous revision: 1.5
done
RCS file: /cvs/java/hints/src/org/netbeans/modules/java/hints/errors/NotInitializedVariable.java,v
done
Checking in src/org/netbeans/modules/java/hints/errors/NotInitializedVariable.java;
/cvs/java/hints/src/org/netbeans/modules/java/hints/errors/NotInitializedVariable.java,v  <--  NotInitializedVariable.java
initial revision: 1.1
done
Checking in src/org/netbeans/modules/java/hints/resources/layer.xml;
/cvs/java/hints/src/org/netbeans/modules/java/hints/resources/layer.xml,v  <--  layer.xml
new revision: 1.30; previous revision: 1.29
done