Now EclipseHandlerUtil.injectFields(..) also adds a <cinit> method

declaration if we're about to add an enum constant.
This commit is contained in:
peichhorn committed 2012-04-21 18:25:06 +02:00
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();
}