aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2020-08-27 23:15:11 +0200
committerRoel Spilker <r.spilker@gmail.com>2020-08-27 23:15:11 +0200
commit9f6c2203c9fd277256ccd9012d7075e7244b7fb6 (patch)
tree4fb7040d4d0f572f8550cb26ed64baeacdb79eb2 /src/core
parenteb78f5c7665833c8e7dedce75fbe102774e370ae (diff)
downloadlombok-9f6c2203c9fd277256ccd9012d7075e7244b7fb6.tar.gz
lombok-9f6c2203c9fd277256ccd9012d7075e7244b7fb6.tar.bz2
lombok-9f6c2203c9fd277256ccd9012d7075e7244b7fb6.zip
trivial - Only assign variable once
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java5
1 files changed, 1 insertions, 4 deletions
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<JCAnnotation> annotations = param.getModifiers().getAnnotations();
if (annotations != null && !annotations.isEmpty()) {