I have created this enum class
public enum StreetNameEnum {
StreetOwner("0"), StreetedBy("1"), StreetedFor("2"), RegisteredBy("3"), StreetContact("4"), AssignedTo("5");
private String code;
StreetRoleEnum(String code) {}
public String getCode() {
return code;
}
}
SonarQube issue:
Rename this constant name to match the regular expression '^[A-Z]A-Z0-9$'.
It means your constants are supposed to match this regular expression:
^[A-Z][A-Z0-9](_[A-Z0-9]+)$
Which basically means, only use upper case characters, numbers and underscores (in the order which is valid Java syntax). So instead of StreetOwner
, use STREET_OWNER
. RegisteredBy
should be REGISTERED_BY
and so forth.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With