JDK-8013789 : Compiler should emit bridges in interfaces
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8,8-repo-lambda
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-05-02
  • Updated: 2017-05-17
  • Resolved: 2013-06-18
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.
JDK 8
8 b96Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
As part of the effort to remove bridging complexity form VM and metafactory, the compiler should start generating bridges in interfaces. There are two scenario we need to cover:

1) Generate bridges in interface using existing bridging logic
2) Pass the metafactory additional bridging info so that the functional interface is correctly implemented

The first part is simple; it means generating bridges in cases like the following:

interface A {
   Object m();
}

interface B extends A {
   String m();
   //there should be a bridge to A.m()Object
}

The second part is more subtle, as current bridging logic doesn't cover cases like:

interface A {
   Object m();
}

interface B {
   String m();
}

interface C extends A, B { }