struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "songwanging (JIRA)" <j...@apache.org>
Subject [jira] [Created] (WW-4546) unclosed instantiation of PrintWriter
Date Thu, 10 Sep 2015 15:19:45 GMT
songwanging created WW-4546:
-------------------------------

             Summary: unclosed instantiation of PrintWriter 
                 Key: WW-4546
                 URL: https://issues.apache.org/jira/browse/WW-4546
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.3.24
            Reporter: songwanging
            Priority: Minor


In method execute() of class XSLTResult.java (src\core\src\main\java\org\apache\struts2\views\xslt\XSLTResult.java).

The instantiation of PrintWriter should be closed after all writing is done.

  public void execute(ActionInvocation invocation) throws Exception {
	…
 	PrintWriter writer = response.getWriter();
...
 writer.flush(); // ...and flush...
}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message