Skip to content

Commit

Permalink
Eliminating duplicate execution of checkFacade logic in ResponseFacade (
Browse files Browse the repository at this point in the history
#657)

Eliminating duplicate execution of checkFacade logic in ResponseFacade
  • Loading branch information
xxeol2 authored and markt-asf committed Sep 6, 2023
1 parent e92bc0e commit b1cdb09
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions java/org/apache/catalina/connector/ResponseFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,19 @@ public String getCharacterEncoding() {

@Override
public ServletOutputStream getOutputStream() throws IOException {
checkFacade();
ServletOutputStream sos = response.getOutputStream();
if (isFinished()) {
response.setSuspended(true);
}
return sos;
return response.getOutputStream();
}


@Override
public PrintWriter getWriter() throws IOException {
checkFacade();
PrintWriter writer = response.getWriter();
if (isFinished()) {
response.setSuspended(true);
}
return writer;
return response.getWriter();
}


Expand Down

0 comments on commit b1cdb09

Please sign in to comment.