ConstantField
Field name is CONSTANT_CASE, but field is not static and final

Category
Severity
SUGGESTION
Maturity

The problem

The Google Java Style Guide §5.2.4 requires constant names to use CONSTANT_CASE.

When naming a field with CONSTANT_CASE, make sure the field is static, final, and of immutable type. If the field doesn’t meet those criteria, use lowerCamelCase instead.

The check recognizes all primitive, String, and enum fields as deeply immutable. It is possible to create mutable enums, but doing so is strongly discouraged.

Suppression

Suppress false positives by adding an @SuppressWarnings("ConstantField") annotation to the enclosing element.