Summary: | [compiler] "Parameter is never read" could be customized for constructors | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Christophe Cornu <christophe.cornu+eclipse> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | daniel_megert, jerome_lanneluc, markus.kell.r, martinae, philippe_mulet |
Version: | 3.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Christophe Cornu
2006-11-18 16:40:34 EST
Typo on arg3, I meant: class MyClass { Foo foo; Bar bar; String msg; public MyClass(Foo foo, Bar bar, String msg) { this.foo = foo; this.msg = msg; // more work } A common practise to prevent such bugs is to make these fields final. A warning is problematic, since it will inevitably lead to false positives. You can enable the "Parameter is never read" compiler problem. Moving to jdt.core to decide. Comment 3 is the actual feature you are looking for. We could special case constructors though. |