Reports ambiguous accesses of a super class field from an inner or anonymous class, where a local variable, parameter or field with identical name is available in the surrounding code. In this situation a cursory examination of the code may suggest that an element in the surrounding code is accessed, when in actual fact a field from the super class is accessed. To clarify the intent of the code it is recommended to add a super qualifier to the field access.

Example:


class X {
  protected String s;
}
class Y {
  void foo(String s) {
    new X() {{
      System.out.println(s); // here the field is accessed not the parameter
    }};
  }
}