History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-9064
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Alexey Kudravtsev
Reporter: Dmitry Jemerov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

"Field can be local" quickfix should not create redundant variable

Created: 06 Sep 06 13:59   Updated: 06 Nov 08 23:32
Component/s: Code Analysis. Inspection
Fix Version/s: Undefined

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
public class A {
  private final boolean myIsTag;
  private JLabel myLabel;

  public A(boolean isTag) {
    myIsTag = isTag;

    myLabel.setText(myIsTag ? "one" : "two");
}

If I apply the quickfix "Convert to local", it creates a local variable which is immediately highlighted as redundant:

final boolean isTag1 = isTag;

It should simply convert all usages of field to usages of parameter and not create any variables.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.