Add implementation note in DefaultAsyncServerResponse

See gh-37257
This commit is contained in:
Brian Clozel
2026-09-10 16:59:06 +02:00
parent b96592e4af
commit bcd78a2ccc
@@ -116,6 +116,8 @@ final class DefaultAsyncServerResponse extends ErrorHandlingServerResponse imple
WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(request);
AsyncWebRequest asyncWebRequest = asyncManager.getAsyncWebRequest();
// defensive check as asyncWebRequest should not be null,
// should have been set already in HandlerFunctionAdapter#getWebAsyncManager
if (asyncWebRequest == null) {
asyncWebRequest = WebAsyncUtils.createAsyncWebRequest(request, response);
asyncManager.setAsyncWebRequest(asyncWebRequest);