[lworld] Integrated: 8373825: [lworld] ForwardingFileManager always closes its delegate leading to ClosedFileSystemException in TestOriginatingElements
David Beaumont
duke at openjdk.org
Tue Feb 17 12:49:37 UTC 2026
On Wed, 17 Dec 2025 09:20:53 GMT, David Beaumont <duke at openjdk.org> 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 <david.beaumont at oracle.com>
Committer: Roger Riggs <rriggs at openjdk.org>
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
More information about the valhalla-dev
mailing list