From 9d6a6b68f25ba24e856cf139a157d31accfebd74 Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 19 Sep 2011 13:19:27 +0000 Subject: [PATCH] JSP unloading code was retaining a reference to the unloaded JSP preventing the associated class from being unloaded until the JSP that replaced it was unloaded. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1172610 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/jasper/compiler/JspRuntimeContext.java | 1 + java/org/apache/jasper/util/FastRemovalDequeue.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/java/org/apache/jasper/compiler/JspRuntimeContext.java b/java/org/apache/jasper/compiler/JspRuntimeContext.java index 796131806..b2bc33596 100644 --- a/java/org/apache/jasper/compiler/JspRuntimeContext.java +++ b/java/org/apache/jasper/compiler/JspRuntimeContext.java @@ -250,6 +250,7 @@ public final class JspRuntimeContext { replaced.getJspUri(), context.getContextPath())); } unloadJspServletWrapper(replaced); + entry.clearReplaced(); } return entry; } diff --git a/java/org/apache/jasper/util/FastRemovalDequeue.java b/java/org/apache/jasper/util/FastRemovalDequeue.java index 74a65fd71..b43d7e480 100644 --- a/java/org/apache/jasper/util/FastRemovalDequeue.java +++ b/java/org/apache/jasper/util/FastRemovalDequeue.java @@ -284,6 +284,10 @@ public class FastRemovalDequeue { this.replaced = replaced; } + public final void clearReplaced() { + this.replaced = null; + } + private final Entry getNext() { return next; } -- 2.11.0