diff options
author | Emil Lundberg <emil@emlun.se> | 2019-01-10 05:50:35 +0100 |
---|---|---|
committer | Emil Lundberg <emil@emlun.se> | 2019-01-13 02:38:09 +0100 |
commit | e7face9bd6d7660cf37f1c04b9754a1d0352f02e (patch) | |
tree | 5b946c9621073c49da81826d94a41b0cc3b0e5b7 /src | |
parent | 683b43257c417fce0c1154eb666eabcf6af5f30c (diff) | |
download | lombok-e7face9bd6d7660cf37f1c04b9754a1d0352f02e.tar.gz lombok-e7face9bd6d7660cf37f1c04b9754a1d0352f02e.tar.bz2 lombok-e7face9bd6d7660cf37f1c04b9754a1d0352f02e.zip |
Inline single-use variable
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacSingularsRecipes.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java index de45649b..1eb80f29 100644 --- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java +++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java @@ -251,15 +251,12 @@ public class JavacSingularsRecipes { } void generateClearMethod(boolean deprecate, JavacTreeMaker maker, JCExpression returnType, JCStatement returnStatement, SingularData data, JavacNode builderType, JCTree source) { - - List<JCVariableDecl> params = List.nil(); - JCStatement clearStatement = generateClearStatements(maker, data, builderType); List<JCStatement> statements = returnStatement != null ? List.of(clearStatement, returnStatement) : List.of(clearStatement); JCBlock body = maker.Block(0, statements); Name methodName = builderType.toName(HandlerUtil.buildAccessorName("clear", data.getPluralName().toString())); - finishAndInjectMethod(maker, returnType, builderType, source, deprecate, body, methodName, params); + finishAndInjectMethod(maker, returnType, builderType, source, deprecate, body, methodName, List.<JCVariableDecl>nil()); } protected abstract JCStatement generateClearStatements(JavacTreeMaker maker, SingularData data, JavacNode builderType); |