mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 00:16:47 +00:00
Now EclipseHandlerUtil.injectFields(..) also adds a <cinit> method
declaration if we're about to add an enum constant.
This commit is contained in:
1 parent
3f408782de
commit
34a8a4a080
1 file changed
+1
-1
@@ -1164,7 +1164,7 @@ public class EclipseHandlerUtil {
|
||||
parent.fields = newArray;
|
||||
}
|
||||
|
||||
if ((field.modifiers & Modifier.STATIC) != 0) {
|
||||
if (isEnumConstant(field) || (field.modifiers & Modifier.STATIC) != 0) {
|
||||
if (!hasClinit(parent)) {
|
||||
parent.addClinit();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user