[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


On Mon, 11 Mar 2024 14:31:24 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> 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.

This should/can be fixed in the main line; it is not Valhalla dependent.

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

PR Comment: https://git.openjdk.org/valhalla/pull/1042#issuecomment-1988586833



More information about the valhalla-dev mailing list