This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-jsp.git
The following commit(s) were added to refs/heads/master by this push:
new 124fb6c SLING-11301 : Servlet.destroy never called for bundled scripts
124fb6c is described below
commit 124fb6c16edff7707009319307863bb4f0c44492
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Mon May 9 13:25:02 2022 +0200
SLING-11301 : Servlet.destroy never called for bundled scripts
---
.../org/apache/sling/scripting/jsp/PrecompiledJSPRunner.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git
a/src/main/java/org/apache/sling/scripting/jsp/PrecompiledJSPRunner.java
b/src/main/java/org/apache/sling/scripting/jsp/PrecompiledJSPRunner.java
index afd645a..eee7bcf 100644
--- a/src/main/java/org/apache/sling/scripting/jsp/PrecompiledJSPRunner.java
+++ b/src/main/java/org/apache/sling/scripting/jsp/PrecompiledJSPRunner.java
@@ -92,10 +92,14 @@ public class PrecompiledJSPRunner {
public void cleanup() {
final Set<JspHolder> holders = new HashSet<>(this.holders.values());
this.holders.clear();
- for(final JspHolder h : holders) {
- if ( h.wrapper != null ) {
- h.wrapper.destroy(true);
- }
+ try {
+ for(final JspHolder h : holders) {
+ if ( h.wrapper != null ) {
+ h.wrapper.destroy(true);
+ }
+ }
+ } catch ( final Throwable t) {
+ // we ignore this exception as this might be called during shutdown
}
}