From bbaa932c11dbe70bb14ec49434df9ef5196b04cc Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Thu, 10 Jan 2019 04:32:15 +0100 Subject: Replace for-int with for-each --- src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/lombok/javac') diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java index d3db63ff..d4becda7 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java @@ -94,8 +94,8 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer { statements.append(createConstructBuilderVarIfNeeded(maker, data, builderType, source)); JCExpression thisDotFieldDotAdd = chainDots(builderType, "this", data.getPluralName().toString(), getAddMethodName()); ListBuffer invokeAddExprBuilder = new ListBuffer(); - for (int i = 0; i < names.length; i++) { - invokeAddExprBuilder.append(maker.Ident(names[i])); + for (Name name : names) { + invokeAddExprBuilder.append(maker.Ident(name)); } List invokeAddExpr = invokeAddExprBuilder.toList(); JCExpression invokeAdd = maker.Apply(List.nil(), thisDotFieldDotAdd, invokeAddExpr); -- cgit