diff options
Diffstat (limited to 'src/core')
4 files changed, 5 insertions, 7 deletions
diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java index ad8f978a..1546e523 100644 --- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java +++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java @@ -281,7 +281,8 @@ public class JavacSingularsRecipes { return maker.Exec(invokeAdd); } - protected void finishAndInjectSingularMethod(JavacTreeMaker maker, JCExpression returnType, JCStatement returnStatement, SingularData data, JavacNode builderType, JCTree source, boolean fluent, JCModifiers mods, ListBuffer<JCStatement> statements, List<JCVariableDecl> params, String addMethodName) { + protected void finishAndInjectSingularMethod(JavacTreeMaker maker, JCExpression returnType, JCStatement returnStatement, SingularData data, JavacNode builderType, JCTree source, boolean fluent, boolean deprecate, ListBuffer<JCStatement> statements, List<JCVariableDecl> params, String addMethodName) { + JCModifiers mods = makeMods(maker, builderType, deprecate); if (returnStatement != null) statements.append(returnStatement); JCBlock body = maker.Block(0, statements.toList()); Name name = data.getSingularName(); diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java index 97329f78..9d5264c4 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java @@ -107,8 +107,7 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer { params.append(generateSingularMethodParameter(i, maker, data, builderType, source, names[i])); } - JCModifiers mods = makeMods(maker, builderType, deprecate); - finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, mods, statements, params.toList(), getAddMethodName()); + finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, deprecate, statements, params.toList(), getAddMethodName()); } @Override diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java index 76c58678..182bf78a 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java @@ -105,8 +105,7 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize JCVariableDecl param = generateSingularMethodParameter(0, maker, data, builderType, source, data.getSingularName()); List<JCVariableDecl> params = List.of(param); - JCModifiers mods = makeMods(maker, builderType, deprecate); - finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, mods, statements, params, "add"); + finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, deprecate, statements, params, "add"); } @Override diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java index 6add2fcb..255bb63a 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java @@ -139,8 +139,7 @@ public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer { JCVariableDecl paramValue = generateSingularMethodParameter(1, maker, data, builderType, source, valueName); List<JCVariableDecl> params = List.of(paramKey, paramValue); - JCModifiers mods = makeMods(maker, builderType, deprecate); - finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, mods, statements, params, "put"); + finishAndInjectSingularMethod(maker, returnType, returnStatement, data, builderType, source, fluent, deprecate, statements, params, "put"); } @Override |