Community
Participate
Eclipse IDE
M20050831-1200, but also I20050830-0800 Consider below snippet. ---------- Sup1.java -------------- class Sup1<E> { E foo(E e) { // m2 return null; } } class Sub1<T> extends Sup1<T> { @Override T foo(Object arg0) { // m1 return null; } } --------------------------------- The eclipse compiler considers Sub1.foo to not override Sup1.foo. Javac and the override indicator think it *does* override, due to JLS3 8.4.2: "The signature of a method m1 is a subsignature of the signature of a method m2 if m2 has the same signature as m1, or the signature of m1 is the same as the erasure of the signature of m2." In this case, the erasure of m2 (Sup1.foo) is 'foo(Object)', which is the same as the signature of m1.
Added MethodVerifier test072 Released into HEAD and the 3.1.2 branch
Verified for 3.1.2 using build M20060109-1200.
Verified for 3.2 M4 using build I20051215-1506.