1.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java Thu Feb 21 15:23:48 2013 +0000 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java Thu Feb 21 15:25:03 2013 +0000 1.3 @@ -580,7 +580,17 @@ 1.4 for (Type t : formalInterface.getTypeArguments()) { 1.5 if (actualTypeargs.head.hasTag(WILDCARD)) { 1.6 WildcardType wt = (WildcardType)actualTypeargs.head; 1.7 - typeargs.append(wt.type); 1.8 + Type bound; 1.9 + switch (wt.kind) { 1.10 + case UNBOUND: 1.11 + //use declared bound if it doesn't depend on formal type-args 1.12 + bound = wt.bound.bound.containsAny(formalInterface.getTypeArguments()) ? 1.13 + syms.objectType : wt.bound.bound; 1.14 + break; 1.15 + default: 1.16 + bound = wt.type; 1.17 + } 1.18 + typeargs.append(bound); 1.19 } else { 1.20 typeargs.append(actualTypeargs.head); 1.21 }