JDK-8081512 : Remove sun.invoke.anon classes, or move / co-locate them with tests
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 8,9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-05-29
  • Updated: 2017-05-17
  • Resolved: 2015-12-10
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 JDK 9
8u102Fixed 9 b103Fixed
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8154301 :  
Description
The classes in sun.invoke.anon are only used by some hotspot tests, and appears to be old code and we suspect it could be removed or moved to test location to be run on the bootclasspath.

Also see: JDK-8081444 & JDK-6990182
Comments
It was an artifact of how to implement method handles a long time ago, before the jdk7 first implementation (which itself predate the lambda form implementation). The idea was to be able to create one bytecode template for a function (a method handle atom) and reuse it with different signatures. This implementation was never really used because while it's possible to patch instructions like getfield and invoke*, it's not possible to patch instructions like aload/iload. That's why in the valhalla workspace there is a new bytecode name typed, but that's another story.
01-03-2016

An exhaustive search on Maven central has not revealed any usage of these internal APIs.
01-03-2016