[lworld] RFR: 8373825: [lworld] ForwardingFileManager always closes its delegate leading to ClosedFileSystemException in TestOriginatingElements [v3]
David Beaumont
duke at openjdk.org
Wed Dec 17 09:52:45 UTC 2025
> Allow users of ForwardingFileManager to specify if the delegate file manager should also be 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 fix could also probable go straight into mainline as a clone since it won't break anything there.
David Beaumont has updated the pull request incrementally with one additional commit since the last revision:
undo reformatting
-------------
Changes:
- all: https://git.openjdk.org/valhalla/pull/1810/files
- new: https://git.openjdk.org/valhalla/pull/1810/files/d49af5d7..d41fac6b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=valhalla&pr=1810&range=02
- incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1810&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/valhalla/pull/1810.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1810/head:pull/1810
PR: https://git.openjdk.org/valhalla/pull/1810
More information about the valhalla-dev
mailing list