Files
shakilurrehman21 9266c23c4c Avoid premature close of cached connection in JarUrlClassLoader
When createAndConnect(url) is called concurrently, compute(url, ...)
previously called Connection.closeIfNotNull(existing) and returned
connection.open(). This incorrectly decremented the reference count
of the existing active connection and replaced it in the map with
the newly created one, which could lead to premature closure of the
underlying JarFile when the existing connection was closed.

This commit collapses the compute call into a single function.

See gh-52803

Signed-off-by: shakilurrehman21 <rehmanshakil21@gmail.com>
2026-11-13 09:43:39 -08:00
..