Community
Participate
Working Groups
I20070917-0010 While verifying bug 202624, I found that error messages are different in the two following cases: // First case public class Test { public <T> void func(Class<XX> cls){}; // says 'Duplicate method func(Class<Test.XX>) in type Test' public <A, B> void func(Class<XX<A, B>> cls) {} // says 'Method func(Class<Test.XX<A,B>>) has the same erasure // func(Class<T>) as another method in type Test' class XX<A, B> {} } // Second case public class Test { public <T> void func(Class<XX<T,T>> cls){}; // says same erasure public <A, B> void func(Class<XX<A, B>> cls) {} // says same erasure class XX<A, B> {} } JDK 6 does in both cases as Eclipse does in second case, which is what I would have expected in first case as well. Furthermore, Eclipse message do not cite the conflicting method, making the diagnostic harder. Opening as minor though, since Eclipse still yields an error message that is related to the issue at hand.
Created attachment 79407 [details] Proposed patch Changed to pass along whether the parameters of the 2 methods are equal. So we'll use the erasure error message for both methods when they are not equal.
Released into HEAD for 3.4M3 Added GenericTypeTest 1185
Verified for 3.4M3 using I20071029-0010 build.