Skip to content

Commit

Permalink
Fix enum field update, change ENUM to
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhengyang committed Oct 9, 2022
1 parent 4471aaa commit 292e95d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public void edit(FieldAccess f) throws CannotCompileException {
reinitializeStatics[0] = true;
}
if (originalField != null) {
// ENUM$VALUES is last in enumeration
if (originalClass.isEnum() && "ENUM$VALUES".equals(f.getFieldName())) {
// $VALUES is last in enumeration
if (originalClass.isEnum() && "$VALUES".equals(f.getFieldName())) {
if (reinitializeStatics[0]) {
LOGGER.debug("New field will be initialized {}", f.getFieldName());
} else {
Expand Down Expand Up @@ -149,7 +149,7 @@ private static boolean checkOldEnumValues(CtClass ctClass, Class<?> originalClas
try {
CtField existing = ctClass.getDeclaredField(en.toString());
} catch (NotFoundException e) {
LOGGER.debug("Enum field deleted. ENUM$VALUES will be reinitialized {}", en.toString());
LOGGER.debug("Enum field deleted. $VALUES will be reinitialized {}", en.toString());
return true;
}
}
Expand Down

0 comments on commit 292e95d

Please sign in to comment.