From ee2d3371e1ff7bb248362817cbc0008e77588437 Mon Sep 17 00:00:00 2001 From: Antonio Petrelli Date: Mon, 16 Jun 2008 18:27:18 +0000 Subject: [PATCH] WW-2538 Removed the "close" call of the writer of the response. git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@668256 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/struts2/views/xslt/XSLTResult.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java b/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java index 871129f3b..a55184a03 100644 --- a/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java +++ b/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java @@ -22,7 +22,6 @@ package org.apache.struts2.views.xslt; import java.io.IOException; import java.io.PrintWriter; -import java.io.Writer; import java.net.URL; import java.util.HashMap; import java.util.Map; @@ -315,8 +314,6 @@ public class XSLTResult implements Result { try { HttpServletResponse response = ServletActionContext.getResponse(); - Writer writer = response.getWriter(); - // Create a transformer for the stylesheet. Templates templates = null; Transformer transformer; @@ -354,13 +351,11 @@ public class XSLTResult implements Result { LOG.debug("xmlSource = " + xmlSource); transformer.transform(xmlSource, new StreamResult(out)); - out.close(); // ...and flush... + out.flush(); // ...and flush... if (LOG.isDebugEnabled()) { LOG.debug("Time:" + (System.currentTimeMillis() - startTime) + "ms"); } - - writer.flush(); } catch (Exception e) { LOG.error("Unable to render XSLT Template, '" + location + "'", e); throw e;