aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/JavacHandlerUtil.java
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2017-02-09 22:45:45 +0100
committerRoel Spilker <r.spilker@gmail.com>2017-02-09 22:52:38 +0100
commit70f77f928ac7a6edf3ef91a41399c9a79561c871 (patch)
tree228cfbb2ec9f05bf8aa6881c3de5e4037bd9558d /src/core/lombok/javac/handlers/JavacHandlerUtil.java
parentb42fef8edc8b3d5458c74c8b049c0cbb842b1ca1 (diff)
downloadlombok-70f77f928ac7a6edf3ef91a41399c9a79561c871.tar.gz
lombok-70f77f928ac7a6edf3ef91a41399c9a79561c871.tar.bz2
lombok-70f77f928ac7a6edf3ef91a41399c9a79561c871.zip
[i1014] Only add lombok.Generated if it is explicitly turned on
Diffstat (limited to 'src/core/lombok/javac/handlers/JavacHandlerUtil.java')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
index 0b4e839d..af8289a3 100644
--- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java
+++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
@@ -1025,10 +1025,10 @@ public class JavacHandlerUtil {
public static void addGenerated(JCModifiers mods, JavacNode node, int pos, JCTree source, Context context) {
if (!LombokOptionsFactory.getDelombokOptions(context).getFormatPreferences().generateGenerated()) return;
- if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_JAVAX_GENERATED_ANNOTATIONS)) {
+ if (HandlerUtil.shouldAddGenerated(node)) {
addAnnotation(mods, node, pos, source, context, "javax.annotation.Generated", node.getTreeMaker().Literal("lombok"));
}
- if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS)) {
+ if (Boolean.TRUE.equals(node.getAst().readConfiguration(ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS))) {
addAnnotation(mods, node, pos, source, context, "lombok.Generated", null);
}
}