RFR: 8359477: com/sun/net/httpserver/Test12.java appears to have a temp file race [v3]

Jaikiran Pai jpai at openjdk.org
Mon Jun 16 10:01:41 UTC 2025


On Mon, 16 Jun 2025 09:49:56 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>  I was under the impression that shutting down the executor (i.e., interrupting the server handlers) would result in server releasing all acquired resources, including issuing a FIS::close.

It's not the `HttpServer` implementation which opens and closes these file descriptors. Instead it's the (application specific) request handlers - in this case it is the test specific `FileServerHandler` which knows which file to open and server and then close when done. It's done here https://github.com/openjdk/jdk/blob/master/test/jdk/com/sun/net/httpserver/FileServerHandler.java#L121. The `HttpServer` will not know of any resources that these application specific handlers would have opened.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25820#discussion_r2149549035


More information about the net-dev mailing list