diff -r 37a5d7eccb87 -r de1ec6fc93fe src/share/classes/com/sun/tools/javac/code/Type.java --- a/src/share/classes/com/sun/tools/javac/code/Type.java Fri Dec 14 11:16:46 2012 +0000 +++ b/src/share/classes/com/sun/tools/javac/code/Type.java Sat Dec 15 13:54:51 2012 +0000 @@ -302,10 +302,12 @@ * never complete classes. Where isSameType would complete a * class, equals assumes that the two types are different. */ + @Override public boolean equals(Object t) { return super.equals(t); } + @Override public int hashCode() { return super.hashCode(); } @@ -996,34 +998,6 @@ return "(" + argtypes + ")" + restype; } - public boolean equals(Object obj) { - if (this == obj) - return true; - if (!(obj instanceof MethodType)) - return false; - MethodType m = (MethodType)obj; - List args1 = argtypes; - List args2 = m.argtypes; - while (!args1.isEmpty() && !args2.isEmpty()) { - if (!args1.head.equals(args2.head)) - return false; - args1 = args1.tail; - args2 = args2.tail; - } - if (!args1.isEmpty() || !args2.isEmpty()) - return false; - return restype.equals(m.restype); - } - - public int hashCode() { - int h = METHOD.ordinal(); - for (List thisargs = this.argtypes; - thisargs.tail != null; /*inlined: thisargs.nonEmpty()*/ - thisargs = thisargs.tail) - h = (h << 5) + thisargs.head.hashCode(); - return (h << 5) + this.restype.hashCode(); - } - public List getParameterTypes() { return argtypes; } public Type getReturnType() { return restype; } public List getThrownTypes() { return thrown; }