Reports lambda parameters named identically to visible fields of the containing classes. As a result of such naming, you may accidentally use the lambda parameter where the identically named field is intended.

A quick-fix is suggested to rename the lambda parameter.

Example:


  public class MyClass {
    public Object foo;

    void sort(List<Integer> list) {
      list.sort((foo, bar) -> foo - bar);
    }
  }

Use the option to choose whether to ignore fields that are not visible from the lambda expression. For example, private fields of a superclass.