This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 41cf5dabe4 Review "Resolve nested JAR entries in JarFileUrlNestedJar
using the..."
41cf5dabe4 is described below
commit 41cf5dabe402dd30773745014a8a7d8ca45e9e0b
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Nov 4 16:10:46 2026 +0000
Review "Resolve nested JAR entries in JarFileUrlNestedJar using the..."
Fix leak
Co-authored by: Claude / Sonnet 5.5
---
java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java
b/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java
index c0583b5897..8fdb4382c2 100644
--- a/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java
+++ b/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java
@@ -49,6 +49,8 @@ public class JarFileUrlNestedJar extends
AbstractInputStreamJar {
// causes jarConn.getJarFile() above to throw.
jarEntry = jarConn.getJarEntry();
if (jarEntry == null) {
+ // The constructor is not going to complete so the caller can't
close the JarFile
+ warFile.close();
throw new FileNotFoundException(url.toExternalForm());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]