}
@Override
protected void doVisitClass(@Nullable JavaTypeElement oldType, @Nullable JavaTypeElement newType) {
isEnumClass = newType != null && newType.getDeclaringElement().getKind() == ElementKind.ENUM;
}
<BUG>@Override
protected boolean shouldCheck(JavaFieldElement oldField, JavaFieldElement newField) {

return isEnumClass && super.shouldCheck(oldField, newField)
</BUG>
&& oldField.getDeclaringElement().getKind() == ElementKind.ENUM_CONSTANT

}
@Override
protected void doVisitClass(@Nullable JavaTypeElement oldType, @Nullable JavaTypeElement newType) {
isEnumClass = newType != null && newType.getDeclaringElement().getKind() == ElementKind.ENUM;
}
private boolean shouldCheck(JavaFieldElement oldField, JavaFieldElement newField) {
return isEnumClass && isBothAccessible(oldField, newField)
&& oldField.getDeclaringElement().getKind() == ElementKind.ENUM_CONSTANT
