diff options
author | Emil Lundberg <emil@emlun.se> | 2019-01-10 03:32:48 +0100 |
---|---|---|
committer | Emil Lundberg <emil@emlun.se> | 2019-01-13 02:20:03 +0100 |
commit | 8cec66794357b26f53a773f8dd448b2b3b1fdd72 (patch) | |
tree | 35c4869c9cb26e8388fa57db701dd723bc049798 /src | |
parent | 2747ce6a2ca3ae5b06cc8fdbd1c2c8607c515858 (diff) | |
download | lombok-8cec66794357b26f53a773f8dd448b2b3b1fdd72.tar.gz lombok-8cec66794357b26f53a773f8dd448b2b3b1fdd72.tar.bz2 lombok-8cec66794357b26f53a773f8dd448b2b3b1fdd72.zip |
Inline single-use variable
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java index 955dfef0..13418903 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java @@ -108,9 +108,8 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize JCBlock body = maker.Block(0, statements.toList()); Name name = data.getSingularName(); if (!fluent) name = builderType.toName(HandlerUtil.buildAccessorName("add", name.toString())); - Name paramName = data.getSingularName(); - JCVariableDecl param = generateSingularMethodParameter(0, maker, data, builderType, source, paramName); + JCVariableDecl param = generateSingularMethodParameter(0, maker, data, builderType, source, data.getSingularName()); finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(param)); } |