From f84349965803816d46473b42d08ed0c0d288ce8a Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Thu, 10 Jan 2019 02:53:09 +0100 Subject: Extract local variable paramName --- .../javac/handlers/singulars/JavacJavaUtilListSetSingularizer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/lombok/javac/handlers/singulars') 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 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)); } -- cgit