aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok')
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
index 9d5264c4..d3db63ff 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
@@ -84,17 +84,17 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer {
protected void generateSingularMethod(boolean deprecate, JavacTreeMaker maker, JCExpression returnType, JCStatement returnStatement, SingularData data, JavacNode builderType, JCTree source, boolean fluent) {
LombokImmutableList<String> suffixes = getArgumentSuffixes();
Name[] names = new Name[suffixes.size()];
- for (int i = 0; i < suffixes.size(); i++) {
+ for (int i = 0; i < names.length; i++) {
String s = suffixes.get(i);
Name n = data.getSingularName();
names[i] = s.isEmpty() ? n : builderType.toName(s);
}
-
+
ListBuffer<JCStatement> statements = new ListBuffer<JCStatement>();
statements.append(createConstructBuilderVarIfNeeded(maker, data, builderType, source));
JCExpression thisDotFieldDotAdd = chainDots(builderType, "this", data.getPluralName().toString(), getAddMethodName());
ListBuffer<JCExpression> invokeAddExprBuilder = new ListBuffer<JCExpression>();
- for (int i = 0; i < suffixes.size(); i++) {
+ for (int i = 0; i < names.length; i++) {
invokeAddExprBuilder.append(maker.Ident(names[i]));
}
List<JCExpression> invokeAddExpr = invokeAddExprBuilder.toList();
@@ -103,7 +103,7 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer {
statements.append(st);
ListBuffer<JCVariableDecl> params = new ListBuffer<JCVariableDecl>();
- for (int i = 0; i < suffixes.size(); i++) {
+ for (int i = 0; i < names.length; i++) {
params.append(generateSingularMethodParameter(i, maker, data, builderType, source, names[i]));
}