xxeol2 commented on PR #654: URL: https://github.com/apache/tomcat/pull/654#issuecomment-1706706294
I'm curious if following code changes would introduce any side effects. ### Origin ```java public ServletOutputStream getOutputStream() throws IOException { checkFacade(); ServletOutputStream sos = response.getOutputStream(); if (isFinished()) { response.setSuspended(true); } return sos; } public PrintWriter getWriter() throws IOException { checkFacade(); PrintWriter writer = response.getWriter(); if (isFinished()) { response.setSuspended(true); } return writer; } ``` ### Revised ```java public ServletOutputStream getOutputStream() throws IOException { if (isFinished()) { response.setSuspended(true); } return response.getOutputStream(); } public PrintWriter getWriter() throws IOException { if (isFinished()) { response.setSuspended(true); } return response.getWriter(); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org