[lworld] RFR: 8355227: [lworld] Clarify preview API status for some valhalla APIs [v2]

Chen Liang liach at openjdk.org
Thu May 1 04:43:48 UTC 2025


> Per [JEP 12](https://openjdk.org/jeps/12):
> 
>> In order for frameworks to deliver early support for a preview language feature, frameworks should utilize the reflective preview APIs that are co-developed with it. This will allow frameworks to keep up when programs are written to use the permanent version of the language feature.
> 
> According to these rules, the `Objects` methods and the `IdentityException` class themselves must be reflective preview APIs: programs compiled without preview feature dependencies that are running with preview features enabled should be able to access these APIs, as at run-time, they may receive value objects and `IdentityException` thrown by the JVM.
> 
> The only remaining essential preview APIs are the constructors of `IdentityException`: non-preview programs have no reason to construct them.
> 
> In addition, fixed a few JEP feature reference: notably, add reference to [Strict Fields JEP](https://openjdk.org/jeps/8350458).
> 
> Also, made ClassFile API new models reflective preview APIs - class file processors wish to process structures from preview class files even if the current runtime is not in preview. This is already happening to javac and javap.

Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:

 - Merge branch 'lworld' into fix/preview-annos
 - 8355227: [lworld] Clarify preview API status for some vallhalla APIs

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

Changes: https://git.openjdk.org/valhalla/pull/1439/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1439&range=01
  Stats: 19 lines in 6 files changed: 12 ins; 0 del; 7 mod
  Patch: https://git.openjdk.org/valhalla/pull/1439.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1439/head:pull/1439

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


More information about the valhalla-dev mailing list