From 786a6ffd234de977728250b6aa47a4be0b76a491 Mon Sep 17 00:00:00 2001 From: Sander Koning Date: Mon, 27 Feb 2012 21:48:31 +0100 Subject: 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. --- src/core/lombok/javac/handlers/HandleDelegate.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core/lombok') diff --git a/src/core/lombok/javac/handlers/HandleDelegate.java b/src/core/lombok/javac/handlers/HandleDelegate.java index 9eca23db..41e587f8 100644 --- a/src/core/lombok/javac/handlers/HandleDelegate.java +++ b/src/core/lombok/javac/handlers/HandleDelegate.java @@ -288,7 +288,13 @@ public class HandleDelegate extends JavacAnnotationHandler { for (TypeMirror param : sig.type.getTypeVariables()) { Name name = ((TypeVar) param).tsym.name; - typeParams.append(maker.TypeParameter(name, maker.Types(types.getBounds((TypeVar) param)))); + + ListBuffer bounds = types.getBounds((TypeVar) param).isEmpty() ? null : new ListBuffer(); + 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)); } -- cgit