From 5f6fe616defeef3f839c52e1b964e8ed60075f14 Mon Sep 17 00:00:00 2001 From: kpapakyriakos <128795393+kpapakyriakos@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:10:22 +0200 Subject: [PATCH] Improve jar resources' release robustness Fixes: #34601 --- .../main/java/io/quarkus/bootstrap/runner/JarResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/JarResource.java b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/JarResource.java index 4bc3147fd37cf..0a8ff83203eb3 100644 --- a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/JarResource.java +++ b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/JarResource.java @@ -184,11 +184,11 @@ public void close() { final JarFile zipFileLocal = this.zipFile; if (zipFileLocal != null) { try { + this.zipFile = null; zipFileLocal.close(); - } catch (IOException e) { + } catch (Throwable e) { //ignore } - this.zipFile = null; } } finally { writeLock.unlock();