aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorCaleb Brinkman <cbrinkman@sonatype.com>2019-09-19 15:16:02 -0500
committerCaleb Brinkman <cbrinkman@sonatype.com>2019-09-19 15:16:06 -0500
commit24a49a9d2bc9ae6776eabcbeb8ce6bbe4ad5ebcf (patch)
tree49529e895935ecc5d8c6152887f70ea1caaabd11 /src/core/lombok/javac
parent4b6588ed02830e48adc3d178e5fac66c6b0fe943 (diff)
downloadlombok-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.java7
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());