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 218844 - Add fixable hint for "variable might not be initialized"
Summary: Add fixable hint for "variable might not be initialized"
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-22 21:49 UTC by markiewb
Modified: 2013-09-02 14:19 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2012-09-22 21:49:16 UTC
[ BUILD # : 201209210001 ]
[ JDK VERSION : 1.6.35 ]

public class JavaApplication2 {

    final static String foo;

    public static void main(String[] args) {
        int a = foo.length();
    }
}

results in error "variable foo might not be initialized"

EXPECTED: provide a fixable hint which initializes the variable with a default

value