报告不必要地声明为 final 的局部变量或形参。

出于简洁的原因,某些编码标准不赞成声明为 final 的变量。

示例:


  class Foo {
    Foo(Object o) {}

    void bar(final Object o) {
      new Foo(o);
    }
  }

在应用快速修复后:


  class Foo {
    Foo(Object o) {}

    void bar(Object o) {
      new Foo(o);
    }
  }

Use the inspection's options to define what kinds of parameters or local variables should be reported.