RFR: 8356577: Migrate ClassFileVersionTest to be feature-agnostic

Chen Liang liach at openjdk.org
Thu May 8 20:11:08 UTC 2025


In #24923 we noted that ClassFileVersionTest depends on arbitrary preview features to have javac mark itself as preview. This creates an extra, hard-to-detect dependency on those features, and make its maintenance costly. The best way to have a class that has preview bit is to use ClassFile API to generate such a simple class instead, now that ClassFile API is available.

Testing: This test itself

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

Commit messages:
 - 8356577: Migrate ClassFileVersionTest to be feature-agnostic

Changes: https://git.openjdk.org/jdk/pull/25128/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25128&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8356577
  Stats: 19 lines in 1 file changed: 7 ins; 8 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/25128.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25128/head:pull/25128

PR: https://git.openjdk.org/jdk/pull/25128


More information about the hotspot-runtime-dev mailing list