diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-02-14 01:21:17 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-02-14 01:21:24 +0100 |
commit | 72f546f9cb424932024e91b2c4431aea51909c42 (patch) | |
tree | 03b89ddae6d70ae312fa1e13ebd42cee776ab327 /src/core/lombok/javac | |
parent | 89f98da78d3ffd9e9f6f7151fcaf5e4329d2e8dd (diff) | |
download | lombok-72f546f9cb424932024e91b2c4431aea51909c42.tar.gz lombok-72f546f9cb424932024e91b2c4431aea51909c42.tar.bz2 lombok-72f546f9cb424932024e91b2c4431aea51909c42.zip |
[trivial] improving consistency between javac vs. ecj output
wasn't worth an issue on the tracker: javac and ecj handlers for static constructors would differ; ecjs would specify the return type and constructor invocation using fully qualified types, whereas the handler for javac did not.
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleConstructor.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java index d022995a..e0abb53b 100644 --- a/src/core/lombok/javac/handlers/HandleConstructor.java +++ b/src/core/lombok/javac/handlers/HandleConstructor.java @@ -459,22 +459,15 @@ public class HandleConstructor { ListBuffer<JCTypeParameter> typeParams = new ListBuffer<JCTypeParameter>(); ListBuffer<JCVariableDecl> params = new ListBuffer<JCVariableDecl>(); - ListBuffer<JCExpression> typeArgs1 = new ListBuffer<JCExpression>(); - ListBuffer<JCExpression> typeArgs2 = new ListBuffer<JCExpression>(); ListBuffer<JCExpression> args = new ListBuffer<JCExpression>(); if (!type.typarams.isEmpty()) { for (JCTypeParameter param : type.typarams) { - typeArgs1.append(maker.Ident(param.name)); - typeArgs2.append(maker.Ident(param.name)); typeParams.append(maker.TypeParameter(param.name, param.bounds)); } - returnType = maker.TypeApply(maker.Ident(type.name), typeArgs1.toList()); - constructorType = maker.TypeApply(maker.Ident(type.name), typeArgs2.toList()); - } else { - returnType = maker.Ident(type.name); - constructorType = maker.Ident(type.name); } + returnType = namePlusTypeParamsToTypeReference(maker, typeNode, type.typarams); + constructorType = namePlusTypeParamsToTypeReference(maker, typeNode, type.typarams); for (JavacNode fieldNode : fields) { JCVariableDecl field = (JCVariableDecl) fieldNode.get(); |