[lworld] RFR: 8327639: [lworld] test/jdk/java/lang/invoke/callerSensitive/CallerSensitiveAccess.java fails with --enable-preview
Roger Riggs
rriggs at openjdk.org
Mon Mar 11 16:39:22 UTC 2024
The test contains a bug in which it attempts to use streams from ModuleReader.list() after the ModuleReader has been closed. Closing ModuleReader closes the underlying streams to the Jar/Zip file.
The bug is only exercised when a patched module is read. Currently, --enable-preview uses module patching of the java.base module to include a set of classes that have been converted to be value classes.
The test is modified to cache the results of the stream in a List and keep the scoped structure used by try-with-resources.
-------------
Commit messages:
- 8327639: [lworld] test/jdk/java/lang/invoke/callerSensitive/CallerSensitiveAccess.java fails with --enable-preview
Changes: https://git.openjdk.org/valhalla/pull/1042/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1042&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8327639
Stats: 7 lines in 1 file changed: 1 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/valhalla/pull/1042.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1042/head:pull/1042
PR: https://git.openjdk.org/valhalla/pull/1042
More information about the valhalla-dev
mailing list