mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-11-18 17:31:38 +08:00
9266c23c4c
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>