From 9f6c2203c9fd277256ccd9012d7075e7244b7fb6 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Thu, 27 Aug 2020 23:15:11 +0200 Subject: trivial - Only assign variable once --- src/core/lombok/javac/handlers/JavacHandlerUtil.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/core/lombok/javac/handlers') diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index a8189562..40b729b2 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -1228,10 +1228,7 @@ public class JavacHandlerUtil { for (int i = 0; i < method.getParameters().size(); i++) { JCTree.JCVariableDecl param = method.getParameters().get(i); if (param.sym == null) { - Type paramType = param.getType().type; - if (paramTypes != null) { - paramType = paramTypes.get(i); - } + Type paramType = paramTypes == null ? param.getType().type : paramTypes.get(i); VarSymbol varSymbol = new VarSymbol(param.mods.flags, param.name, paramType, symtab.noSymbol); List annotations = param.getModifiers().getAnnotations(); if (annotations != null && !annotations.isEmpty()) { -- cgit