Community
Participate
Working Groups
The following program triggers a name clash error from javac 7 while eclipse compiles it silently. class A<T> {} class Super { static void foo(A<Number> p) {} } class Sub extends Super { static void foo(A<Integer> p) {} } Needs to be investigated. This is a follow up from bug 334306.
Satyam, please take a look.
See also oracle/sun bugs 6793555, 6910491, 5009937
Retagging. Not a 1.7 issue per se. Targetting 3.8.
Created attachment 197485 [details] Proposed patch In this patch, I put an additional check for static in Java7 compliance mode. There is still one case where Javac7 behaves differently. Javac doesn't show up any error but Eclipse does show. I believe Eclipse behavior is correct as the number of type parameters are different. ######## class Base { static void foo() {} } class Sub extends Base { static <T> void foo() {} } ####### This case is discussed in javac bug 6910491, but there it tells that the error message is correct.
Srikanth, Please review the patch.
(In reply to comment #4) > Created attachment 197485 [details] > Proposed patch > > In this patch, I put an additional check for static in Java7 compliance mode. > > There is still one case where Javac7 behaves differently. I think this is same as bug 345947 which is open.
Created attachment 201890 [details] Synchronized patch Same patch - synchronized with HEAD.
(In reply to comment #5) > Srikanth, Please review the patch. Patch looks good. (In reply to comment #6) > > There is still one case where Javac7 behaves differently. > > I think this is same as bug 345947 which is open. I think we need some code akin to what Ayush introduced for bug 354579 for this case too. However this can be handled in the context of bug 345947.
Released on HEAD
Verified for 3.8M2 using build I20110911-2000.