From 125b02e84b555d36dd3427919bd02da6ef41ab66 Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Sun, 13 Jan 2019 02:44:01 +0100 Subject: Colocate statements declaration with use in Map generateSingularMethodStatements --- .../lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lombok') diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java index a35412e9..71ddd01d 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilMapSingularizer.java @@ -111,10 +111,10 @@ public class JavacJavaUtilMapSingularizer extends JavacJavaUtilSingularizer { @Override protected ListBuffer generateSingularMethodStatements(JavacTreeMaker maker, SingularData data, JavacNode builderType, JCTree source) { - ListBuffer statements = new ListBuffer(); Name keyName = builderType.toName(data.getSingularName().toString() + "Key"); Name valueName = builderType.toName(data.getSingularName().toString() + "Value"); + ListBuffer statements = new ListBuffer(); /* Generates: this.pluralname$key.add(singularnameKey); */ statements.append(generateSingularMethodAddStatement(maker, builderType, keyName, data.getPluralName() + "$key")); /* Generates: this.pluralname$value.add(singularnameValue); */ -- cgit