This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new a9f06927e0 Java 8 fix a9f06927e0 is described below commit a9f06927e08f1ba3e7a0e0c1141473080044ac4a Author: remm <r...@apache.org> AuthorDate: Tue Mar 25 16:08:46 2025 +0100 Java 8 fix --- java/org/apache/catalina/webresources/CachedResource.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java/org/apache/catalina/webresources/CachedResource.java b/java/org/apache/catalina/webresources/CachedResource.java index 43421287c0..72bd60e967 100644 --- a/java/org/apache/catalina/webresources/CachedResource.java +++ b/java/org/apache/catalina/webresources/CachedResource.java @@ -32,7 +32,6 @@ import java.security.cert.Certificate; import java.text.Collator; import java.util.Arrays; import java.util.Locale; -import java.util.Objects; import java.util.jar.JarFile; import java.util.jar.Manifest; @@ -596,7 +595,7 @@ public class CachedResource implements WebResource { @Override public String getContentType() { // "content/unknown" is the value used by sun.net.www.URLConnection. It is used here for consistency. - return Objects.requireNonNullElse(getResource().getMimeType(), "content/unknown"); + return (getResource().getMimeType() != null) ? getResource().getMimeType() : "content/unknown"; } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org