On Tue, 24 Mar 2026 01:12:25 GMT, Bill Huang <[email protected]> wrote:

> The idea is to implement the **ValueClass** annotation that can be used in 
> test code to allow to run the same tests with and without --enable-preview.
> 
> This annotation should be used to mark value classes.
> 
> The new jtreg test compilation and execution mode that uses javac plugin to 
> process classes during compilation. This plugin change classes with 
> **ValueClass** annotation to value classes.
> By default, the annotation doesn't have any impact on the tests.
> 
> Here are the work items:
> 
> 1. Create ValueClass annotation.
> 2. Create a javac plugin, ValueClassPlugin, that implements a TaskListener to 
> mark a class as a value class during the PARSE phase.
> 3. Build the ValueClass plugin.
> 4. Pass a new plugin option, -Xplugin:ValueClassPlugin, to enable the plugin 
> and enable preview.

This pull request has now been integrated.

Changeset: 788bb286
Author:    Bill Huang <[email protected]>
Committer: Leonid Mesnik <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/788bb2868d1e99ed6e3308c0dfe900da820fab1a
Stats:     303 lines in 9 files changed: 300 ins; 0 del; 3 mod

8380084: [lworld] Implement value classes in test code using annotation

Reviewed-by: liach, lmesnik, vromero

-------------

PR: https://git.openjdk.org/valhalla/pull/2253

Reply via email to