aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java1
-rw-r--r--src/core/lombok/javac/handlers/JavacSingularsRecipes.java12
2 files changed, 7 insertions, 6 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
index a6bc388a..599a4753 100644
--- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java
+++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
@@ -956,6 +956,7 @@ public class JavacHandlerUtil {
}
public static void addGenerated(JCModifiers mods, JavacNode node, int pos, JCTree source, Context context) {
+ if (Boolean.FALSE.equals(node.getAst().readConfiguration(ConfigurationKeys.ADD_GENERATED_ANNOTATIONS))) return;
if (!LombokOptionsFactory.getDelombokOptions(context).getFormatPreferences().generateGenerated()) return;
addAnnotation(mods, node, pos, source, context, "javax.annotation.Generated", node.getTreeMaker().Literal("lombok"));
}
diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
index 53e01ebb..7fca01ae 100644
--- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
+++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java
@@ -231,13 +231,13 @@ public class JavacSingularsRecipes {
if (typeArgs != null) for (JCExpression orig : typeArgs) {
if (!addExtends) {
if (orig.getKind() == Kind.UNBOUNDED_WILDCARD || orig.getKind() == Kind.SUPER_WILDCARD) {
- arguments.append(chainDots(node, "java", "lang", "Object"));
+ arguments.append(genJavaLangTypeRef(node, "Object"));
} else if (orig.getKind() == Kind.EXTENDS_WILDCARD) {
JCExpression inner;
try {
inner = (JCExpression) ((JCWildcard) orig).inner;
} catch (Exception e) {
- inner = chainDots(node, "java", "lang", "Object");
+ inner = genJavaLangTypeRef(node, "Object");
}
arguments.append(cloneType(maker, inner, source, context));
} else {
@@ -259,7 +259,7 @@ public class JavacSingularsRecipes {
if (addExtends) {
arguments.append(maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null));
} else {
- arguments.append(chainDots(node, "java", "lang", "Object"));
+ arguments.append(genJavaLangTypeRef(node, "Object"));
}
}
@@ -280,16 +280,16 @@ public class JavacSingularsRecipes {
protected JCExpression cloneParamType(int index, JavacTreeMaker maker, List<JCExpression> typeArgs, JavacNode builderType, JCTree source) {
if (typeArgs == null || typeArgs.size() <= index) {
- return chainDots(builderType, "java", "lang", "Object");
+ return genJavaLangTypeRef(builderType, "Object");
} else {
JCExpression originalType = typeArgs.get(index);
if (originalType.getKind() == Kind.UNBOUNDED_WILDCARD || originalType.getKind() == Kind.SUPER_WILDCARD) {
- return chainDots(builderType, "java", "lang", "Object");
+ return genJavaLangTypeRef(builderType, "Object");
} else if (originalType.getKind() == Kind.EXTENDS_WILDCARD) {
try {
return cloneType(maker, (JCExpression) ((JCWildcard) originalType).inner, source, builderType.getContext());
} catch (Exception e) {
- return chainDots(builderType, "java", "lang", "Object");
+ return genJavaLangTypeRef(builderType, "Object");
}
} else {
return cloneType(maker, originalType, source, builderType.getContext());