This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 71c6700f3e Need to close jarFile on early exit (like following catch 
does)
71c6700f3e is described below

commit 71c6700f3ec3abd3cc78d379425016fb897ba36a
Author: Mark Thomas <[email protected]>
AuthorDate: Fri May 29 14:17:51 2026 +0100

    Need to close jarFile on early exit (like following catch does)
---
 java/org/apache/catalina/webresources/AbstractSingleArchiveResource.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/java/org/apache/catalina/webresources/AbstractSingleArchiveResource.java 
b/java/org/apache/catalina/webresources/AbstractSingleArchiveResource.java
index 202c8406cd..5719e0341b 100644
--- a/java/org/apache/catalina/webresources/AbstractSingleArchiveResource.java
+++ b/java/org/apache/catalina/webresources/AbstractSingleArchiveResource.java
@@ -53,6 +53,7 @@ public abstract class AbstractSingleArchiveResource extends 
AbstractArchiveResou
             // Need to create a new JarEntry so the certificates can be read
             JarEntry jarEntry = jarFile.getJarEntry(getResource().getName());
             if (jarEntry == null) {
+                getArchiveResourceSet().closeJarFile();
                 return null;
             }
             InputStream is = jarFile.getInputStream(jarEntry);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to