[lworld] RFR: 8373825: [lworld] ForwardingFileManager always closes its delegate leading to ClosedFileSystemException in TestOriginatingElements [v5]

David Beaumont duke at openjdk.org
Mon Feb 9 22:01:19 UTC 2026


On Sat, 7 Feb 2026 08:07:09 GMT, Chen Liang <liach at openjdk.org> wrote:

> JavaCompiler::getStandardFileManager specifies:
> 
> > The standard file manager will be automatically reopened if
> > it is accessed after calls to `flush` or `close`.
> > The standard file manager must be usable with other tools.
> 
> Logically the forwarding manager should never need to override close. The problem really lies in the standard file manager not reopening the correct resources.

Interesting. Is that going to be easy enough to fix now do you think?

I'd like to fix this test failure right now with minimal necessary changes, so if this is a bigger change I'd want to pull it out into its own issue.

> src/java.compiler/share/classes/javax/tools/ForwardingJavaFileManager.java line 1:
> 
>> 1: /*
> 
> Since you explicitly overrides `close` in the test, let's remove the changes here.

Done.

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

PR Comment: https://git.openjdk.org/valhalla/pull/1810#issuecomment-3871307115
PR Review Comment: https://git.openjdk.org/valhalla/pull/1810#discussion_r2782273124


More information about the valhalla-dev mailing list