On Tue, 1 Sep 2026 20:15:36 GMT, Alan Bateman <[email protected]> wrote:
>> 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 Looks good. ------------- Marked as reviewed by cjplummer (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/32198#pullrequestreview-5085091010
