On Wed, 17 Dec 2025 09:20:53 GMT, David Beaumont <[email protected]> wrote:
> Allow users of Toolbox.MemoryFileManager to specify if the delegate file > manager should also be closed when it is closed. > > This fixes a use-after-close bug in TestOriginatingElements, where the system > file manager and wrapping memory file manager have different, nested, > lifetimes resulting in an early call to close the system file manager when > the wrapper is closed, causing subsequent legitimate use of the system file > manager to fail. > > This wasn't noticed before now since the system file manager was using the > singleton JRT file-system in which "close" does nothing. Now it's using a > properly scoped instance of the JRT file-system which can be closed. This pull request has now been integrated. Changeset: 0213b850 Author: David Beaumont <[email protected]> Committer: Roger Riggs <[email protected]> URL: https://git.openjdk.org/valhalla/commit/0213b850fa33b26910732b7f789626ba15d98540 Stats: 158 lines in 5 files changed: 66 ins; 44 del; 48 mod 8373825: [lworld] ForwardingFileManager always closes its delegate leading to ClosedFileSystemException in TestOriginatingElements Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/valhalla/pull/1810
