Community
Participate
Working Groups
If a local variable is assigned, but not read after the assignment, that would be a nice Unnecessary Code warning, too. private void currentWarning() { int x = 0; // this generates the "Local variable is // never read" warning } private void proposedWarning() { int x = 0; if (x > 0) // since we are using x here, there is no warning above; return; x = 7; // this is where I propose a new warning, because we're // done with x already; setting its value is of no use. }
I think you are asking to detect dead value store. This would indeed by a nice addition.
Changing Version tag to something more believable. Note that this is not a statement about when the enhancement request will be addressed (the Target Milestone field is used for that); the Version tag should be set to the version of Eclipse you were using when you saw the need for the enhancement.