diff options
author | Caleb Brinkman <cbrinkman@sonatype.com> | 2019-09-19 15:16:02 -0500 |
---|---|---|
committer | Caleb Brinkman <cbrinkman@sonatype.com> | 2019-09-19 15:16:06 -0500 |
commit | 24a49a9d2bc9ae6776eabcbeb8ce6bbe4ad5ebcf (patch) | |
tree | 49529e895935ecc5d8c6152887f70ea1caaabd11 /src/core/lombok/javac | |
parent | 4b6588ed02830e48adc3d178e5fac66c6b0fe943 (diff) | |
download | lombok-24a49a9d2bc9ae6776eabcbeb8ce6bbe4ad5ebcf.tar.gz lombok-24a49a9d2bc9ae6776eabcbeb8ce6bbe4ad5ebcf.tar.bz2 lombok-24a49a9d2bc9ae6776eabcbeb8ce6bbe4ad5ebcf.zip |
Fix more copy/paste test errors
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacSingularsRecipes.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java index 56116346..10e6f9b4 100644 --- a/src/core/lombok/javac/handlers/JavacSingularsRecipes.java +++ b/src/core/lombok/javac/handlers/JavacSingularsRecipes.java @@ -326,9 +326,10 @@ public class JavacSingularsRecipes { private void generatePluralMethod(CheckerFrameworkVersion cfv, boolean deprecate, JavacTreeMaker maker, JCExpression returnType, JCStatement returnStatement, SingularData data, JavacNode builderType, JCTree source, boolean fluent, AccessLevel access) { ListBuffer<JCStatement> statements = generatePluralMethodStatements(maker, data, builderType, source); Name name = data.getPluralName(); - Name prefixedSingularName = builderType.toName(data.getSetterPrefix()); - name = fluent ? prefixedSingularName : builderType.toName(HandlerUtil.buildAccessorName( - getAddMethodName() + "All", name.toString())); + + Name prefixedSingularName = data.getSetterPrefix().isEmpty() ? name : builderType.toName(HandlerUtil.buildAccessorName(data.getSetterPrefix(), data.getPluralName().toString())); + name = fluent ? prefixedSingularName + : builderType.toName(HandlerUtil.buildAccessorName(getAddMethodName() + "All", name.toString())); JCExpression paramType = getPluralMethodParamType(builderType); paramType = addTypeArgs(getTypeArgumentsCount(), true, builderType, paramType, data.getTypeArgs(), source); long paramFlags = JavacHandlerUtil.addFinalIfNeeded(Flags.PARAMETER, builderType.getContext()); |