1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Feb 15 08:35:05 2011 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Wed Feb 16 10:27:00 2011 -0800 1.3 @@ -776,10 +776,12 @@ 1.4 // due to error recovery or mixing incompatible class files 1.5 return ambiguityError(m1, m2); 1.6 } 1.7 + List<Type> allThrown = chk.intersect(mt1.getThrownTypes(), mt2.getThrownTypes()); 1.8 + Type newSig = types.createMethodTypeWithThrown(mostSpecific.type, allThrown); 1.9 MethodSymbol result = new MethodSymbol( 1.10 mostSpecific.flags(), 1.11 mostSpecific.name, 1.12 - null, 1.13 + newSig, 1.14 mostSpecific.owner) { 1.15 @Override 1.16 public MethodSymbol implementation(TypeSymbol origin, Types types, boolean checkResult) { 1.17 @@ -789,9 +791,6 @@ 1.18 return super.implementation(origin, types, checkResult); 1.19 } 1.20 }; 1.21 - result.type = (Type)mostSpecific.type.clone(); 1.22 - result.type.setThrown(chk.intersect(mt1.getThrownTypes(), 1.23 - mt2.getThrownTypes())); 1.24 return result; 1.25 } 1.26 if (m1SignatureMoreSpecific) return m1; 1.27 @@ -852,13 +851,8 @@ 1.28 } 1.29 //append varargs element type as last synthetic formal 1.30 args.append(types.elemtype(varargsTypeTo)); 1.31 - MethodSymbol msym = new MethodSymbol(to.flags_field, 1.32 - to.name, 1.33 - (Type)to.type.clone(), //see: 6990136 1.34 - to.owner); 1.35 - MethodType mtype = msym.type.asMethodType(); 1.36 - mtype.argtypes = args.toList(); 1.37 - return msym; 1.38 + Type mtype = types.createMethodTypeWithParameters(to.type, args.toList()); 1.39 + return new MethodSymbol(to.flags_field, to.name, mtype, to.owner); 1.40 } else { 1.41 return to; 1.42 }