You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by js...@apache.org on 2024/09/16 12:47:56 UTC
(sling-org-apache-sling-scripting-jsp) branch jsedding/SLING-12421-JspServletWrapper-race created (now fda89fa)
This is an automated email from the ASF dual-hosted git repository.
jsedding pushed a change to branch jsedding/SLING-12421-JspServletWrapper-race
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-jsp.git
at fda89fa SLING-12421 - Race between serving request and destroying JspServletWrapper
This branch includes the following new commits:
new fda89fa SLING-12421 - Race between serving request and destroying JspServletWrapper
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(sling-org-apache-sling-scripting-jsp) 01/01: SLING-12421 - Race between serving request and destroying JspServletWrapper
Posted by js...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jsedding pushed a commit to branch jsedding/SLING-12421-JspServletWrapper-race
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-jsp.git
commit fda89fa4eb1169d0f3c8e27844b5e5565e0df3bd
Author: Julian Sedding <(none)>
AuthorDate: Mon Sep 16 14:47:19 2024 +0200
SLING-12421 - Race between serving request and destroying JspServletWrapper
---
.../scripting/jsp/jasper/servlet/JspServletWrapper.java | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/sling/scripting/jsp/jasper/servlet/JspServletWrapper.java b/src/main/java/org/apache/sling/scripting/jsp/jasper/servlet/JspServletWrapper.java
index 49640f0..7134b3a 100644
--- a/src/main/java/org/apache/sling/scripting/jsp/jasper/servlet/JspServletWrapper.java
+++ b/src/main/java/org/apache/sling/scripting/jsp/jasper/servlet/JspServletWrapper.java
@@ -457,7 +457,7 @@ public class JspServletWrapper {
* @throws SlingPageException JSP page exception handler exceptions
* @throws SlingException for any non runtime exception
* @throws RuntimeException for runtime exceptions
- *
+ *
*/
public void service(final SlingBindings bindings) {
try {
@@ -594,7 +594,6 @@ public class JspServletWrapper {
e.getMessage()), e);
}
}
- theServlet = null;
}
}
}
@@ -604,7 +603,7 @@ public class JspServletWrapper {
return (RuntimeException) e;
}
// wrap in ScriptEvaluationException
- return new ScriptEvaluationException(this.ctxt.getJspFile(),
+ return new ScriptEvaluationException(this.ctxt.getJspFile(),
e.getMessage() == null ? e.toString() : e.getMessage(), e);
}
@@ -645,7 +644,7 @@ public class JspServletWrapper {
null,
javaLineNumber,
ctxt);
-
+
// If the line number is less than one we couldn't find out
// where in the JSP things went wrong
final int jspLineNumber = detail.getJspBeginLineNumber();
@@ -655,13 +654,13 @@ public class JspServletWrapper {
if (options.getDisplaySourceFragment() && detail.getJspExtract() != null ) {
message = Localizer.getMessage("jsp.exception", detail.getJspFileName(), String.valueOf(jspLineNumber))
.concat(" : ").concat(origMsg).concat("\n\n").concat(detail.getJspExtract()).concat("\n");
-
+
} else {
message = Localizer.getMessage("jsp.exception", detail.getJspFileName(), String.valueOf(jspLineNumber))
.concat(" : ").concat(origMsg);
- }
- result = new SlingException(message, ex);
- }
+ }
+ result = new SlingException(message, ex);
+ }
}
} catch (final Exception je) {
// If anything goes wrong, just revert to the original behaviour