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

Method recycle

java/org/apache/catalina/connector/Request.java:467–550  ·  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

465 * Release all object references, and initialize instance variables, in preparation for reuse of this object.
466 */
467 public void recycle() {
468
469 internalDispatcherType = null;
470 requestDispatcherPath = null;
471
472 authType = null;
473 inputBuffer.recycle();
474 usingInputStream = false;
475 usingReader = false;
476 userPrincipal = null;
477 subject = null;
478 parametersParsed = false;
479 if (connector != null) {
480 maxParameterCount = connector.getMaxParameterCount();
481 maxPartCount = connector.getMaxPartCount();
482 maxPartHeaderSize = connector.getMaxPartHeaderSize();
483 } else {
484 maxParameterCount = -1;
485 maxPartCount = -1;
486 maxPartHeaderSize = -1;
487 }
488 if (parts != null) {
489 for (Part part : parts) {
490 try {
491 part.delete();
492 } catch (Throwable t) {
493 ExceptionUtils.handleThrowable(t);
494 log.warn(sm.getString("coyoteRequest.deletePartFailed", part.getName()), t);
495 }
496 }
497 parts = null;
498 }
499 parametersParseException = null;
500 partsParseException = null;
501 locales.clear();
502 localesParsed = false;
503 secure = false;
504 remoteAddr = null;
505 peerAddr = null;
506 remoteHost = null;
507 remotePort = -1;
508 localPort = -1;
509 localAddr = null;
510 localName = null;
511
512 attributes.clear();
513 sslAttributesParsed = false;
514 notes.clear();
515
516 recycleSessionInfo();
517 recycleCookieInfo(false);
518
519 if (getDiscardFacades()) {
520 parameterMap = new ParameterMap<>();
521 } else {
522 parameterMap.setLocked(false);
523 parameterMap.clear();
524 }

Callers 3

asyncDispatchMethod · 0.95
serviceMethod · 0.95
logMethod · 0.95

Calls 14

handleThrowableMethod · 0.95
recycleSessionInfoMethod · 0.95
recycleCookieInfoMethod · 0.95
getDiscardFacadesMethod · 0.95
getMaxParameterCountMethod · 0.80
getMaxPartCountMethod · 0.80
getMaxPartHeaderSizeMethod · 0.80
recycleMethod · 0.65
deleteMethod · 0.65
warnMethod · 0.65
getStringMethod · 0.65
getNameMethod · 0.65

Tested by

no test coverage detected