aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorEmil Lundberg <emil@emlun.se>2019-01-13 02:43:06 +0100
committerEmil Lundberg <emil@emlun.se>2019-01-13 02:43:06 +0100
commitb48af8dce8e76ffb2fb26c8edec8ceafcddb73b6 (patch)
tree93c2102c69bdbbdd0db703b927bc547c8e310481 /src/core
parent4ea8c439e1cc61bca6863ec8cf24e081b939689e (diff)
downloadlombok-b48af8dce8e76ffb2fb26c8edec8ceafcddb73b6.tar.gz
lombok-b48af8dce8e76ffb2fb26c8edec8ceafcddb73b6.tar.bz2
lombok-b48af8dce8e76ffb2fb26c8edec8ceafcddb73b6.zip
Simplify Guava generateSingularMethodStatements return statement to single expression
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
index cfdf26a8..17be15dc 100644
--- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
+++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java
@@ -88,7 +88,6 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer {
@Override
protected ListBuffer<JCStatement> generateSingularMethodStatements(JavacTreeMaker maker, SingularData data, JavacNode builderType, JCTree source) {
- ListBuffer<JCStatement> statements = new ListBuffer<JCStatement>();
Name[] names = generateSingularMethodParameterNames(data, builderType);
JCExpression thisDotFieldDotAdd = chainDots(builderType, "this", data.getPluralName().toString(), getAddMethodName());
@@ -99,8 +98,8 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer {
List<JCExpression> invokeAddExpr = invokeAddExprBuilder.toList();
JCExpression invokeAdd = maker.Apply(List.<JCExpression>nil(), thisDotFieldDotAdd, invokeAddExpr);
JCStatement st = maker.Exec(invokeAdd);
- statements.append(st);
- return statements;
+
+ return new ListBuffer<JCStatement>().append(st);
}
private Name[] generateSingularMethodParameterNames(SingularData data, JavacNode builderType) {