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 271449

Summary: Warning for unused constructor parameters missing
Product: java Reporter: milanka
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: dtrebbien
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 10   
Issue Type: ENHANCEMENT Exception Reporter:

Description milanka 2017-09-08 12:01:44 UTC
public class Test {
    
    private int a;
    private int b;
    private int c;

    public Test(int a, int b, int c) { // "c" is not marked as unused
        this.a = a;
        this.b = b;
    }
}

In the case above I have added "c" to parameters and as a private variable, but forgotten to do the assignment. Of course if I had marked all variables as final I would have noticed the error, but showing a warning would nevertheless be a good thing in my opinion.

Issue https://netbeans.org/bugzilla/show_bug.cgi?id=199451 is related, but I think this issue has less potential problems.