This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 060df1113036e5e16bfec0a39a6a540fdb491689 Author: remm <[email protected]> AuthorDate: Fri Oct 24 12:58:35 2025 +0200 Java compat --- java/org/apache/jasper/servlet/JspServletWrapper.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/java/org/apache/jasper/servlet/JspServletWrapper.java b/java/org/apache/jasper/servlet/JspServletWrapper.java index cac2ed71a2..ace671f6eb 100644 --- a/java/org/apache/jasper/servlet/JspServletWrapper.java +++ b/java/org/apache/jasper/servlet/JspServletWrapper.java @@ -517,9 +517,11 @@ public class JspServletWrapper { try { Throwable realException = ex; // Unwrap Servlet exception once - if (ex instanceof ServletException servletException - && servletException.getRootCause() != null) { - realException = servletException.getRootCause(); + if (ex instanceof ServletException) { + Throwable rootCause = ((ServletException) ex).getRootCause(); + if (rootCause != null) { + realException = rootCause; + } } // Find the first stack frame that represents code generated by --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
