> Update JVMTI ForceEarlyReturnVoid, and the equivalent JDWP command and JDI > method, to specify that the operation fails if the target thread's top frame > is a constructor or the class initializer of a class with > strictly-initialized fields. > > Several options have been explored for both constructors and class > initializers, the details are attached to the JBS issue. > > The changes are very simple. ClassFileParser::parse_fields records if the > class has class has strict instance fields, as it does already for strict > static fields. JvmtiEnvBase::check_top_frame is changed to check if the top > frame is a constructor of a class with strict instance fields in the class > hierarchy or the initializer of a class with strict static fields. This > replaces the check if the top frame is a value class constructor, the interim > solution for the initial JEP 539 integration. > > In jvmti.xml, the custom XML element `externallink` is updated to support the > `sup` element so a "PREVIEW" superscript can decorate links to preview APIs. > > Test ForceEarlyReturnStrictInitFields is added to test ForceEarlyReturnVoid > when the target thread's top frame is the constructor, method, or class > initializer of a a class with strictly-initialized fields. > > Testing: tier 1-5 > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Alan Bateman has updated the pull request incrementally with one additional commit since the last revision: Change sentence with examples to use either-to construct ------------- Changes: - all: https://git.openjdk.org/jdk/pull/32198/files - new: https://git.openjdk.org/jdk/pull/32198/files/24781212..1db6df2b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=32198&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=32198&range=00-01 Stats: 10 lines in 2 files changed: 2 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/32198.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32198/head:pull/32198 PR: https://git.openjdk.org/jdk/pull/32198
