aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/lombok/javac/handlers/HandleGetter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/HandleGetter.java b/src/core/lombok/javac/handlers/HandleGetter.java
index dd0a99ad..fa60504f 100644
--- a/src/core/lombok/javac/handlers/HandleGetter.java
+++ b/src/core/lombok/javac/handlers/HandleGetter.java
@@ -221,8 +221,10 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
private JCMethodDecl createGetter(long access, JavacNode field, TreeMaker treeMaker, boolean lazy, JCTree source) {
JCVariableDecl fieldNode = (JCVariableDecl) field.get();
- // Remember the type; lazy will change it;
+ // Remember the type; lazy will change it
JCExpression methodType = copyType(treeMaker, fieldNode);
+ // Generate the methodName; lazy will change the field type
+ Name methodName = field.toName(toGetterName(field));
List<JCStatement> statements;
JCTree toClearOfMarkers = null;
@@ -234,7 +236,6 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
}
JCBlock methodBody = treeMaker.Block(0, statements);
- Name methodName = field.toName(toGetterName(field));
List<JCTypeParameter> methodGenericParams = List.nil();
List<JCVariableDecl> parameters = List.nil();