aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSuperBuilder.java2
-rw-r--r--src/core/lombok/javac/handlers/HandleSuperBuilder.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
index 455d40ed..7c8e4ea3 100644
--- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
+++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java
@@ -390,10 +390,10 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> {
// Add the toBuilder() method to the annotated class.
switch (methodExists(TO_BUILDER_METHOD_NAME_STRING, tdParent, 0)) {
case EXISTS_BY_USER:
- annotationNode.addWarning("Not generating toBuilder() as it already exists.");
break;
case NOT_EXISTS:
injectMethod(tdParent, generateToBuilderMethod(cfv, builderClassName, builderImplClassName, tdParent, typeParams, ast));
+ break;
default:
// Should not happen.
}
diff --git a/src/core/lombok/javac/handlers/HandleSuperBuilder.java b/src/core/lombok/javac/handlers/HandleSuperBuilder.java
index b7cd6f9a..4cd64b77 100644
--- a/src/core/lombok/javac/handlers/HandleSuperBuilder.java
+++ b/src/core/lombok/javac/handlers/HandleSuperBuilder.java
@@ -377,14 +377,14 @@ public class HandleSuperBuilder extends JavacAnnotationHandler<SuperBuilder> {
if (toBuilder) {
switch (methodExists(TO_BUILDER_METHOD_NAME, tdParent, 0)) {
case EXISTS_BY_USER:
- annotationNode.addWarning("Not generating toBuilder() as it already exists.");
- return;
+ break;
case NOT_EXISTS:
JCMethodDecl md = generateToBuilderMethod(cfv, builderClassName, builderImplClassName, annotationNode, tdParent, typeParams);
if (md != null) {
recursiveSetGeneratedBy(md, ast, annotationNode.getContext());
injectMethod(tdParent, md);
}
+ break;
default:
// Should not happen.
}