Release all object references, and initialize instance variables, in preparation for reuse of this object.
()
| 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 | } |
no test coverage detected