MCPcopy Create free account
hub / github.com/apache/tomcat / recycle

Method recycle

java/org/apache/catalina/connector/Response.java:196–223  ·  view source on GitHub ↗

Release all object references, and initialize instance variables, in preparation for reuse of this object.

()

Source from the content-addressed store, hash-verified

194 * Release all object references, and initialize instance variables, in preparation for reuse of this object.
195 */
196 public void recycle() {
197
198 outputBuffer.recycle();
199 usingOutputStream = false;
200 usingWriter = false;
201 appCommitted = false;
202 included = false;
203 isCharacterEncodingSet = false;
204
205 applicationResponse = null;
206 if (getRequest().getDiscardFacades()) {
207 if (facade != null) {
208 facade.clear();
209 facade = null;
210 }
211 if (outputStream != null) {
212 outputStream.clear();
213 outputStream = null;
214 }
215 if (writer != null) {
216 writer.clear();
217 writer = null;
218 }
219 } else if (writer != null) {
220 writer.recycle();
221 }
222
223 }
224
225
226 // ------------------------------------------------------- Response Methods

Callers 3

asyncDispatchMethod · 0.95
serviceMethod · 0.95
logMethod · 0.95

Calls 4

getRequestMethod · 0.95
recycleMethod · 0.65
clearMethod · 0.65
getDiscardFacadesMethod · 0.45

Tested by

no test coverage detected