aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok
diff options
context:
space:
mode:
authorEmil Lundberg <emil@emlun.se>2019-01-10 04:07:54 +0100
committerEmil Lundberg <emil@emlun.se>2019-01-13 02:25:26 +0100
commitf995dd20360311f355e18bf5fa048058efecdd11 (patch)
tree5ad790a420fdd93a0d221262d51c89fbd4ebef18 /src/core/lombok
parent130c115eaf07ae9183f95c861ebb0c4011c74774 (diff)
downloadlombok-f995dd20360311f355e18bf5fa048058efecdd11.tar.gz
lombok-f995dd20360311f355e18bf5fa048058efecdd11.tar.bz2
lombok-f995dd20360311f355e18bf5fa048058efecdd11.zip
Extract local variable: params
Diffstat (limited to 'src/core/lombok')
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java3
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
index 935edbc3..6beebec7 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java
@@ -109,7 +109,8 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize
if (!fluent) name = builderType.toName(HandlerUtil.buildAccessorName("add", name.toString()));
JCVariableDecl param = generateSingularMethodParameter(0, maker, data, builderType, source, data.getSingularName());
- finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(param));
+ List<JCVariableDecl> params = List.of(param);
+ finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, params);
}
@Override
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
index b1e34d47..cd98fd1e 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java
@@ -145,7 +145,8 @@ public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer {
JCVariableDecl paramKey = generateSingularMethodParameter(0, maker, data, builderType, source, keyName);
JCVariableDecl paramValue = generateSingularMethodParameter(1, maker, data, builderType, source, valueName);
- finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(paramKey, paramValue));
+ List<JCVariableDecl> params = List.of(paramKey, paramValue);
+ finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, params);
}
@Override