This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 2f51425 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=64005 avoid NPE 2f51425 is described below commit 2f514255fc0032786de3a12fb3656c76c9c7e457 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Dec 17 21:51:08 2019 +0000 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=64005 avoid NPE Avoid the NPE when working with the URL for the root of a packed WAR --- java/org/apache/catalina/webresources/CachedResource.java | 10 ++++++++++ webapps/docs/changelog.xml | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/java/org/apache/catalina/webresources/CachedResource.java b/java/org/apache/catalina/webresources/CachedResource.java index 58247a8..712a463 100644 --- a/java/org/apache/catalina/webresources/CachedResource.java +++ b/java/org/apache/catalina/webresources/CachedResource.java @@ -26,6 +26,7 @@ import java.net.URLConnection; import java.net.URLStreamHandler; import java.security.Permission; import java.security.cert.Certificate; +import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.jar.Manifest; @@ -557,5 +558,14 @@ public class CachedResource implements WebResource { public JarFile getJarFile() throws IOException { return ((JarURLConnection) resourceURL.openConnection()).getJarFile(); } + + @Override + public JarEntry getJarEntry() throws IOException { + if (getEntryName() == null) { + return null; + } else { + return super.getJarEntry(); + } + } } } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 242a34c..f69a971 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -56,6 +56,11 @@ in JNDIRealm. (remm) </fix> <fix> + <bug>64005</bug>: Correct a regression in the static resource caching + changes introduced in 9.0.28. Avoid a <code>NullPointerException</code> + when working with the URL provided for the root of a packed WAR. (markt) + </fix> + <fix> <bug>64006</bug>: Provide default configuration source based on the current directory if none has been set, for full compatibility with existing code. (remm) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org