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

Method check

java/org/apache/catalina/core/AsyncContextImpl.java:645–660  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

643 }
644
645 private void check() {
646 Request request = this.request;
647 if (hasBeenRecycled.get() || request == null) {
648 // AsyncContext has been recycled and should not be being used
649 throw new IllegalStateException(sm.getString("asyncContextImpl.requestEnded"));
650 }
651 // Local copy of request (and any other local copies taken before the check above) must be valid.
652 if (hasOnErrorReturned.get() && !request.getCoyoteRequest().isRequestThread()) {
653 /*
654 * Non-container thread is trying to use the AsyncContext after an error has occurred and the call to
655 * AsyncListener.onError() has returned. At this point, the non-container thread should not be trying to use
656 * the AsyncContext due to possible race conditions.
657 */
658 throw new IllegalStateException(sm.getString("asyncContextImpl.afterOnError"));
659 }
660 }
661
662 private static class DebugException extends Exception {
663 @Serial

Callers 11

completeMethod · 0.95
dispatchMethod · 0.95
getRequestMethod · 0.95
getResponseMethod · 0.95
startMethod · 0.95
addListenerMethod · 0.95
createListenerMethod · 0.95
isStartedMethod · 0.95
getTimeoutMethod · 0.95
setTimeoutMethod · 0.95

Calls 4

getCoyoteRequestMethod · 0.95
getMethod · 0.65
getStringMethod · 0.65
isRequestThreadMethod · 0.45

Tested by

no test coverage detected