The code is highlighted only if the field initializer is located in the initializer, and joining it with the field declaration is likely to be safe. In other cases, the inspection provides a quick-fix without code highlighting, as the fix may change the code semantics.
Example:
class MyClass {
static final int intConstant;
static {
intConstant = 10;
}
}
The quick fix moves the assigned value to the field initializer removing the class initializer section if possible:
class MyClass {
static final int intConstant = 10;
}
Since 2017.2