unnamed variables can't be fields so the hidden field check won't get affected by unnamed variables.
public class Test {
String c;
void test(Object obj) {
if (obj instanceof ColoredPoint(String c, String _, int _)) { // violation, c hides field
// '_' can't hide a field
c.equals("s");
}
}
}
child of #14942
Check documentation : https://checkstyle.org/checks/coding/hiddenfield.html
unnamed variables can't be fields so the hidden field check won't get affected by unnamed variables.