mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-02 07:19:01 +00:00
Update `NestedJarFileResources` to fix a race condition that could result in a `NullPointerException`. The methods `getOrCreateInflater` and `endOrCacheInflater` both synchronize on a local `inflaterCache` variable but attempted to use the `this.inflaterCache` instance which could be set to null. The `releaseInflators` method had a synchronized block for ending each inflater but the cache was being nulled out outside the block meaning that the other 2 methods mentioned could hit the race condition. Signed-off-by: Ian Kettle <25729118+icikle@users.noreply.github.com> See gh-51744