1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Fri Oct 24 12:46:07 2008 +0100 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Fri Oct 24 12:46:34 2008 +0100 1.3 @@ -30,6 +30,7 @@ 1.4 import com.sun.tools.javac.code.*; 1.5 import com.sun.tools.javac.jvm.*; 1.6 import com.sun.tools.javac.tree.*; 1.7 +import com.sun.tools.javac.api.Formattable.LocalizedString; 1.8 import static com.sun.tools.javac.comp.Resolve.MethodResolutionPhase.*; 1.9 1.10 import com.sun.tools.javac.code.Type.*; 1.11 @@ -1478,6 +1479,12 @@ 1.12 error.report(log, tree.pos(), type.getEnclosingType(), null, null, null); 1.13 } 1.14 1.15 + private final LocalizedString noArgs = new LocalizedString("compiler.misc.no.args"); 1.16 + 1.17 + public Object methodArguments(List<Type> argtypes) { 1.18 + return argtypes.isEmpty() ? noArgs : argtypes; 1.19 + } 1.20 + 1.21 /** Root class for resolve errors. 1.22 * Instances of this class indicate "Symbol not found". 1.23 * Instances of subclass indicate other errors. 1.24 @@ -1584,8 +1591,8 @@ 1.25 "cant.apply.symbol" + (explanation != null ? ".1" : ""), 1.26 kindname, 1.27 ws.name == names.init ? ws.owner.name : ws.name, 1.28 - ws.type.getParameterTypes(), 1.29 - argtypes, 1.30 + methodArguments(ws.type.getParameterTypes()), 1.31 + methodArguments(argtypes), 1.32 kindName(ws.owner), 1.33 ws.owner.type, 1.34 explanation);