RFR: 8364927: Add @requires annotation to TestReclaimStringsLeaksMemory.java [v3]
jonghoonpark
duke at openjdk.org
Wed Sep 3 13:35:40 UTC 2025
> This change updates `TestReclaimStringsLeaksMemory.java` to properly guard against unsupported GC arguments.
> Previously, the test only checked `@requires vm.gc == "null"`.
>
> The fix separates the tests and adds explicit `@requires` clauses for each GC configuration to ensure the test only runs when supported.
>
> This prevents test failures on VMs that do not support the specified GC.
>
> (This is my first contribution to the JDK. Thank you for your review and guidance.)
jonghoonpark has updated the pull request incrementally with one additional commit since the last revision:
remove non-specific GC test item and include ZGC and Shenandoah
Signed-off-by: jonghoonpark <dev at jonghoonpark.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26766/files
- new: https://git.openjdk.org/jdk/pull/26766/files/e3d7fa54..1002b183
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26766&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26766&range=01-02
Stats: 36 lines in 1 file changed: 22 ins; 11 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/26766.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26766/head:pull/26766
PR: https://git.openjdk.org/jdk/pull/26766
More information about the hotspot-gc-dev
mailing list