Hey,
Been playing around with the module "VisibilityModifier", specifically
the allowPublicImmutableFields property which is enabled by default. See
http://checkstyle.sourceforge.net/config_design.html#VisibilityModifier
.
Quoting the docs: "allowPublicImmutableFields - which allows immutable
fields be declared as public if defined in
final class."
I have found that this doesn't apply to enums (which are implicitly
final instead of explicitly like final classes) and causes a check
error. Is there a rationale behind this, or should the check not error?
This has been tested on the latest version (6.12.1).
Regards,
Edward Knight.