()
| 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 |
no test coverage detected