aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/eclipse')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleFieldDefaults.java2
-rw-r--r--src/core/lombok/eclipse/handlers/HandleValue.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleFieldDefaults.java b/src/core/lombok/eclipse/handlers/HandleFieldDefaults.java
index 2cdfdd4d..0cce0f62 100644
--- a/src/core/lombok/eclipse/handlers/HandleFieldDefaults.java
+++ b/src/core/lombok/eclipse/handlers/HandleFieldDefaults.java
@@ -89,6 +89,8 @@ public class HandleFieldDefaults extends EclipseAnnotationHandler<FieldDefaults>
field.modifiers |= ClassFileConstants.AccFinal;
}
}
+
+ fieldNode.rebuild();
}
public void handle(AnnotationValues<FieldDefaults> annotation, Annotation ast, EclipseNode annotationNode) {
diff --git a/src/core/lombok/eclipse/handlers/HandleValue.java b/src/core/lombok/eclipse/handlers/HandleValue.java
index a1eb24ff..612f218b 100644
--- a/src/core/lombok/eclipse/handlers/HandleValue.java
+++ b/src/core/lombok/eclipse/handlers/HandleValue.java
@@ -57,7 +57,12 @@ public class HandleValue extends EclipseAnnotationHandler<Value> {
}
// Make class final.
- if (!hasAnnotation(NonFinal.class, typeNode)) typeDecl.modifiers |= ClassFileConstants.AccFinal;
+ if (!hasAnnotation(NonFinal.class, typeNode)) {
+ if ((typeDecl.modifiers & ClassFileConstants.AccFinal) == 0) {
+ typeDecl.modifiers |= ClassFileConstants.AccFinal;
+ typeNode.rebuild();
+ }
+ }
new HandleFieldDefaults().generateFieldDefaultsForType(typeNode, annotationNode, AccessLevel.PRIVATE, true, true);