mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-18 00:15:24 +00:00
Consistent use of JavacResolution.typeToJCTree instead of TreeMaker.Types - fixes issue 341 where use of @Delegate with T-extends type parameters would prepend a dot to the fully qualified classname.
This commit is contained in:
1 parent
dbc46eefed
commit
786a6ffd23
1 file changed
+7
-1
@@ -288,7 +288,13 @@ public class HandleDelegate extends JavacAnnotationHandler<Delegate> {
|
||||
|
||||
for (TypeMirror param : sig.type.getTypeVariables()) {
|
||||
Name name = ((TypeVar) param).tsym.name;
|
||||
typeParams.append(maker.TypeParameter(name, maker.Types(types.getBounds((TypeVar) param))));
|
||||
|
||||
ListBuffer<JCExpression> bounds = types.getBounds((TypeVar) param).isEmpty() ? null : new ListBuffer<JCExpression>();
|
||||
for (Type type : types.getBounds((TypeVar) param)) {
|
||||
bounds.append(JavacResolution.typeToJCTree(type, annotation.getAst(), true));
|
||||
}
|
||||
|
||||
typeParams.append(maker.TypeParameter(name, bounds.toList()));
|
||||
typeArgs.append(maker.Ident(name));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user