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 - no quick-fix provided for unitialized local variable
Summary: no quick-fix provided for unitialized local variable
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-21 01:04 UTC by _ gsporar
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 _ 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