RFR: 8345127: Add --sun-misc-unsafe-memory-access=allow when running tests until JDK-8334137 is fixed

Kevin Rushforth kcr at openjdk.org
Fri Dec 13 16:21:10 UTC 2024


Add the `--sun-misc-unsafe-memory-access=allow` flag until [JDK-8334137](https://bugs.openjdk.org/browse/JDK-8334137) is fixed to avoid warnings when running tests (automated and manual) with JDK 24.

I've tested this using a boot JDK of JDK 22.0.2, JDK 23 (the boot JDK we use in production), and in our CI with the latest promoted build of JDK 24, which now warns by default when a deprecated method in `sun.misc.Unsafe` is called.

Without this fix, we see a warning when running our automated or manual tests with JDK 24. With this fix, we see no warnings.

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

Commit messages:
 - Pass option only for JDK 24 or later
 - Merge branch 'master' into 8345127-allow-unsafe
 - 8345127: Add --sun-misc-unsafe-memory-access=allow when running tests until JDK-8334137 is fixed

Changes: https://git.openjdk.org/jfx/pull/1650/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1650&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8345127
  Stats: 64 lines in 3 files changed: 56 ins; 2 del; 6 mod
  Patch: https://git.openjdk.org/jfx/pull/1650.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1650/head:pull/1650

PR: https://git.openjdk.org/jfx/pull/1650


More information about the openjfx-dev mailing list