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 205195

Summary: Hint: Remove unused assignment
Product: java Reporter: stefan79 <stefan79>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: markiewb
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Hardcopy of the example

Description stefan79 2011-11-16 13:18:36 UTC
[ BUILD # : 201111150600 ]
[ JDK VERSION : 1.6.25 ]

Please provide a Correction for "Unused Assignment".

Example-Code
...
public class Test1 {
    public Test1() {
        int iix = 0;      
        iix=2;
        
        if  (iix == 0) {
            int iiy=2;
        }
    }
}
..

Result aufter Correction:
..
public class Test1 {
    public Test1() {
        int iix;
        iix=2;
        
        if  (iix == 0) {
            int iiy=2;
        }
    }
}
...
Comment 1 stefan79 2011-11-16 13:19:41 UTC
Created attachment 113257 [details]
Hardcopy of the example