diff options
author | Roel Spilker <r.spilker@gmail.com> | 2020-08-27 23:15:11 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-08-27 23:15:11 +0200 |
commit | 9f6c2203c9fd277256ccd9012d7075e7244b7fb6 (patch) | |
tree | 4fb7040d4d0f572f8550cb26ed64baeacdb79eb2 /src/core/lombok | |
parent | eb78f5c7665833c8e7dedce75fbe102774e370ae (diff) | |
download | lombok-9f6c2203c9fd277256ccd9012d7075e7244b7fb6.tar.gz lombok-9f6c2203c9fd277256ccd9012d7075e7244b7fb6.tar.bz2 lombok-9f6c2203c9fd277256ccd9012d7075e7244b7fb6.zip |
trivial - Only assign variable once
Diffstat (limited to 'src/core/lombok')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacHandlerUtil.java | 5 |
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()) { |