diff options
author | Sander Koning <askoning@gmail.com> | 2012-02-27 21:48:31 +0100 |
---|---|---|
committer | Sander Koning <askoning@gmail.com> | 2012-02-27 21:48:31 +0100 |
commit | 786a6ffd234de977728250b6aa47a4be0b76a491 (patch) | |
tree | 7acc6c5456d845f16ea38e9d69e16dbc2738a930 /src/core/lombok | |
parent | dbc46eefed2ecf37f248ec67faedf0d776332ed9 (diff) | |
download | lombok-786a6ffd234de977728250b6aa47a4be0b76a491.tar.gz lombok-786a6ffd234de977728250b6aa47a4be0b76a491.tar.bz2 lombok-786a6ffd234de977728250b6aa47a4be0b76a491.zip |
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.
Diffstat (limited to 'src/core/lombok')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleDelegate.java | 8 |
1 files changed, 7 insertions, 1 deletions
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<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)); } |