private void foo(int a) {
int b = 2 * a;
System.out.println("b = " + b);
}
If a parameter is introduced for "2 * a" (while that text is selecetd) then in the refactoring dialog Idea proposes to remove unused parameter a (but the refactoring productes a redundant local variable).
However if a parameter is introduced when caret is on the line with the declaration of b, but no text is selected (or user explicitly selects "b"), then Idea does not detect that "a" is an unused parameter after the refactoring.
Description
private void foo(int a) {
int b = 2 * a;
System.out.println("b = " + b);
}
If a parameter is introduced for "2 * a" (while that text is selecetd) then in the refactoring dialog Idea proposes to remove unused parameter a (but the refactoring productes a redundant local variable).
However if a parameter is introduced when caret is on the line with the declaration of b, but no text is selected (or user explicitly selects "b"), then Idea does not detect that "a" is an unused parameter after the refactoring.