aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2013-12-11 22:38:59 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2013-12-11 22:40:49 +0100
commit7d51842ca381c491d5dfb44bc76b0cea345e7170 (patch)
tree0755b629d11d88b15713bac67d9c12751fe8294b /src
parent5f92913a52f46300235e6f31b356025998d9f859 (diff)
downloadlombok-7d51842ca381c491d5dfb44bc76b0cea345e7170.tar.gz
lombok-7d51842ca381c491d5dfb44bc76b0cea345e7170.tar.bz2
lombok-7d51842ca381c491d5dfb44bc76b0cea345e7170.zip
semi-fix for issue 602, but not complete as adding annotations to generated fields leads to crazy issues (see issue 217): generated LOG field now has @SuppressWarnings on it.
Diffstat (limited to 'src')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleLog.java2
-rw-r--r--src/core/lombok/javac/handlers/HandleLog.java2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleLog.java b/src/core/lombok/eclipse/handlers/HandleLog.java
index 2e7b4475..dd2c7ea8 100644
--- a/src/core/lombok/eclipse/handlers/HandleLog.java
+++ b/src/core/lombok/eclipse/handlers/HandleLog.java
@@ -73,6 +73,8 @@ public class HandleLog {
FieldDeclaration fieldDeclaration = createField(framework, source, loggingType);
fieldDeclaration.traverse(new SetGeneratedByVisitor(source), typeDecl.staticInitializerScope);
+ // TODO temporary workaround for issue 217. http://code.google.com/p/projectlombok/issues/detail?id=217
+ // injectFieldSuppressWarnings(owner, fieldDeclaration);
injectField(owner, fieldDeclaration);
owner.rebuild();
break;
diff --git a/src/core/lombok/javac/handlers/HandleLog.java b/src/core/lombok/javac/handlers/HandleLog.java
index 75a490a5..296f5e92 100644
--- a/src/core/lombok/javac/handlers/HandleLog.java
+++ b/src/core/lombok/javac/handlers/HandleLog.java
@@ -93,7 +93,7 @@ public class HandleLog {
maker.Modifiers(Flags.PRIVATE | Flags.FINAL | Flags.STATIC),
typeNode.toName("log"), loggerType, factoryMethodCall), source, typeNode.getContext());
- injectField(typeNode, fieldDecl);
+ injectFieldSuppressWarnings(typeNode, fieldDecl);
return true;
}