diff options
author | Jan Rieke <it@janrieke.de> | 2020-05-11 08:33:13 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-05-28 21:18:35 +0200 |
commit | b767427f06b60dd236bc2c0d6ea41a0e8446fe08 (patch) | |
tree | 529b01c5c9748504dec950712d2872e38c08639f /src/core/lombok/javac | |
parent | 48b1f17f7ef0e0b3d90dee74ee1b490a02cacff2 (diff) | |
download | lombok-b767427f06b60dd236bc2c0d6ea41a0e8446fe08.tar.gz lombok-b767427f06b60dd236bc2c0d6ea41a0e8446fe08.tar.bz2 lombok-b767427f06b60dd236bc2c0d6ea41a0e8446fe08.zip |
[SuperBuilder] don't warn on existing toBuilder method
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleSuperBuilder.java | 4 |
1 files changed, 2 insertions, 2 deletions
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. } |