VJ update:只判断private函数

Unused parameters for private method misleading. Whatever the values passed to such parameters, the behavior will be the same.

Noncompliant Code Example

private void doSomething(int a, int b) {     // "b" is unused
  compute(a);
}

Compliant Solution

private void doSomething(int a) {
  compute(a);
}

Exceptions

The rule will not raise issues for protected or public methods

See