Pattern: Malformed pattern variable name
Issue: -
Checks that pattern variable names conform to a specified pattern.
class MyClass {
MyClass(Object o1){
if (o1 instanceof String STRING) { // violation, name 'STRING' must
// match pattern '^[a-z][a-zA-Z0-9]*$'
}
if (o1 instanceof Integer num) { // OK
}
}
}