Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50228
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 7 Nov 2010 09:11:00 +0000 (09:11 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 7 Nov 2010 09:11:00 +0000 (09:11 +0000)
Clear the reference to a writer when BodyContentImpl is recycled.

By the way, this calls BodyContentImpl.clear() which recycles the buffer if it is grown too big. Recycling it early is good.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1032232 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/runtime/PageContextImpl.java

index c030910..c4d9c29 100644 (file)
@@ -767,6 +767,7 @@ public class PageContextImpl extends PageContext {
 
     @Override
     public JspWriter popBody() {
+        outs[depth].setWriter(null);
         depth--;
         if (depth >= 0) {
             out = outs[depth];