JDK-8178690 : Remove access bridge generation
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-04-12
  • Updated: 2018-05-16
  • Resolved: 2018-05-16
Description
Conditioned on the appropriate setting of target version, remove generation and use of access bridges that are no longer needed as a result of relaxed nestmate access.  

Specifically: bridges for accessing private members of nestmates are no longer needed; these can be accessed directly via bytecode.  However, some access bridges are still needed for accessing protected members of nestmates that were inherited from non-nestmates.  In the short term, we can simply leave these bridges in place; in the longer term, we can consider using method handles (as the MH runtime will support Lookup.in to teleport through nests.)
Comments
This logic has been implemented in javac. Private access bridges are not generated for classfile version 55 and up. They are still generated for protected accessors. [~mcimadamore] please close this subtask as all the code changes are being handled together. Thanks.
09-05-2018