JDK-8230501 : Class data support for hidden classes
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-09-03
  • Updated: 2020-12-07
  • Resolved: 2020-12-01
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 16
16 b27Fixed
Related Reports
Blocks :  
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8238693 :  
Description
One feature of `Unsafe::defineAnonymousClass`  is constant pool patching that is used by LambdaForm and few external libraries [1].

One idea is to allow a dynamically generated class be defined with a class data which can only be obtained by a full-power lookup (e.g. `Lookup::classData` method).

[1] http://jigsaw-dev.1059479.n5.nabble.com/Remove-sun-misc-Unsafe-defineAnonymousClass-td5715601.html
Comments
Changeset: 4356469a Author: Mandy Chung <mchung@openjdk.org> Date: 2020-12-01 00:24:40 +0000 URL: https://git.openjdk.java.net/jdk/commit/4356469a
01-12-2020

See John's comment on class data: https://bugs.openjdk.java.net/browse/JDK-8171335?focusedCommentId=14300071&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14300071 and also from JDK-8209679.
21-04-2020