JDK-6996758 : Investigate better override bridges strategy
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: unknown
  • Submitted: 2010-11-02
  • Updated: 2013-07-17
  • Resolved: 2013-05-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Related Reports
Relates :  
Relates :  
Relates :  
An attempt to fix 6337171 has been made - however the fix failed due to several problems:

*) Override bridge lead to compatibility issues w.r.t. raw types:

class A<X> {
   public X m(X x) { return x; }
class B<X extends B<X>> extends A<X> {}
class C extends B { }

public class Test  {
    public static void main(String argv[]) {
        C c = new C();
        c.m(new Object());

*) Interplay between overload resolution and override bridge causes infinite loop when code is executed (6996415)

Is it possible to fix 6337171 w/o causing the aforementioned problems?

@ignore This issue is causing the following test to be ignored langtools/test/tools/javac/generics/OverrideBridge.java

EVALUATION Given the delicate nature of this problem (the seemingly right fix has already been implemented, and this resulted in the disruption described in this bug report) i think it's best to defer this to 8.