mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Merge branch '4.0.x' into 4.1.x
Closes gh-51745
This commit is contained in:
+8
-7
@@ -37,6 +37,7 @@ import org.springframework.boot.loader.zip.ZipContent.Kind;
|
||||
* for registration with a {@link Cleaner}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Ian Kettle
|
||||
*/
|
||||
class NestedJarFileResources implements Runnable {
|
||||
|
||||
@@ -116,7 +117,7 @@ class NestedJarFileResources implements Runnable {
|
||||
Deque<Inflater> inflaterCache = this.inflaterCache;
|
||||
if (inflaterCache != null) {
|
||||
synchronized (inflaterCache) {
|
||||
Inflater inflater = this.inflaterCache.poll();
|
||||
Inflater inflater = inflaterCache.poll();
|
||||
if (inflater != null) {
|
||||
return inflater;
|
||||
}
|
||||
@@ -136,7 +137,7 @@ class NestedJarFileResources implements Runnable {
|
||||
synchronized (inflaterCache) {
|
||||
if (this.inflaterCache == inflaterCache && inflaterCache.size() < INFLATER_CACHE_LIMIT) {
|
||||
inflater.reset();
|
||||
this.inflaterCache.add(inflater);
|
||||
inflaterCache.add(inflater);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -167,13 +168,13 @@ class NestedJarFileResources implements Runnable {
|
||||
private IOException releaseInflators(IOException exceptionChain) {
|
||||
Deque<Inflater> inflaterCache = this.inflaterCache;
|
||||
if (inflaterCache != null) {
|
||||
try {
|
||||
synchronized (inflaterCache) {
|
||||
synchronized (inflaterCache) {
|
||||
try {
|
||||
inflaterCache.forEach(Inflater::end);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
this.inflaterCache = null;
|
||||
finally {
|
||||
this.inflaterCache = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return exceptionChain;
|
||||
|
||||
Reference in New Issue
Block a user