aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2012-06-18 23:19:23 +0200
committerRoel Spilker <r.spilker@gmail.com>2012-06-18 23:38:02 +0200
commit78bf0f6fbbba39e1c56d5dda3df7b0c3eaec74ad (patch)
tree68ba25b643c4278a30c1dd13b50b1843171f4b2b /src/core
parent0a53be1d3ec125b8ae9fae63fba03f55ec90e2a3 (diff)
downloadlombok-78bf0f6fbbba39e1c56d5dda3df7b0c3eaec74ad.tar.gz
lombok-78bf0f6fbbba39e1c56d5dda3df7b0c3eaec74ad.tar.bz2
lombok-78bf0f6fbbba39e1c56d5dda3df7b0c3eaec74ad.zip
Fix for issue 376 for javac.
Diffstat (limited to 'src/core')
-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();