JDK-8242013 : Specify the behavior of java.lang.constant API for hidden classes
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 15
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-04-02
  • Updated: 2020-04-21
  • Resolved: 2020-04-21
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.
Other
repo-valhallaFixed
Related Reports
Relates :  
Description
https://mail.openjdk.java.net/pipermail/valhalla-dev/2020-April/007055.html
Comments
Pushed together with JDK-8238358 Implementation of JEP 371
21-04-2020

John suggests [1] the descriptor string for a hidden class be of the form: "L" + N + ";" + "/" + <suffix> Class::describeString produces a human-readable string but not resolvable name. Therefore a `ClassDesc` cannot be produced by calling `ClassDesc::ofDescriptor` and other factory methods from the result string. option c: `Lfoo/Bar.123Z;` option c': `Lfoo/Bar;/123Z` Further discussion on the new form of the descriptor string for hidden classes, the impact of option c' on existing libraries and JVM implementation is likely quite high since the signature name has been inside the "L;" envelope since day 1. Spec change includes: - `Lookup::defineHiddenClass` also specifies the descriptor string for a hidden class of the form: "L" + N + "." + <suffix> + ";" - extend TypeDescriptor for entities that cannot be described nominally. If it can be described nominally, TypeDescriptor::descriptorString returns a field/method descriptor conforming to JVMS 4.3. If it cannot be described nominally, the result string is not a type descriptor. No nominal descriptor can be produced. - specify in the javadoc for Class::descriptorString and MethodType::descriptorString that the result string when it can be described nominally conforming to JVMS 4.3 or when it cannot be described nominally. - No JVMS change [1] https://mail.openjdk.java.net/pipermail/valhalla-dev/2020-April/007093.html
16-04-2020