diff options
author | Emil Lundberg <emil@emlun.se> | 2019-01-10 02:53:09 +0100 |
---|---|---|
committer | Emil Lundberg <emil@emlun.se> | 2019-01-13 02:13:56 +0100 |
commit | f84349965803816d46473b42d08ed0c0d288ce8a (patch) | |
tree | 68eb1686857c4e70bb305ffc4ccebfd1c93cf069 | |
parent | 360c1d5a21273793ef5c96c21b979501bdebb5c3 (diff) | |
download | lombok-f84349965803816d46473b42d08ed0c0d288ce8a.tar.gz lombok-f84349965803816d46473b42d08ed0c0d288ce8a.tar.bz2 lombok-f84349965803816d46473b42d08ed0c0d288ce8a.zip |
Extract local variable paramName
-rw-r--r-- | src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java index 1b661bb2..79d5166e 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java @@ -111,11 +111,12 @@ abstract class JavacJavaUtilListSetSingularizer extends JavacJavaUtilSingularize Name name = data.getSingularName(); long paramFlags = JavacHandlerUtil.addFinalIfNeeded(Flags.PARAMETER, builderType.getContext()); if (!fluent) name = builderType.toName(HandlerUtil.buildAccessorName("add", name.toString())); + Name paramName = data.getSingularName(); JCExpression paramType = cloneParamType(0, maker, data.getTypeArgs(), builderType, source); List<JCAnnotation> typeUseAnns = getTypeUseAnnotations(paramType); paramType = removeTypeUseAnnotations(paramType); JCModifiers paramMods = typeUseAnns.isEmpty() ? maker.Modifiers(paramFlags) : maker.Modifiers(paramFlags, typeUseAnns); - JCVariableDecl param = maker.VarDef(paramMods, data.getSingularName(), paramType, null); + JCVariableDecl param = maker.VarDef(paramMods, paramName, paramType, null); finishAndInjectMethod(maker, returnType, builderType, source, mods, body, name, List.of(param)); } |