From e7face9bd6d7660cf37f1c04b9754a1d0352f02e Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Thu, 10 Jan 2019 05:50:35 +0100 Subject: Inline single-use variable --- src/core/lombok/javac/handlers/JavacSingularsRecipes.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') 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 params = List.nil(); - JCStatement clearStatement = generateClearStatements(maker, data, builderType); List 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.nil()); } protected abstract JCStatement generateClearStatements(JavacTreeMaker maker, SingularData data, JavacNode builderType); -- cgit