File tree 3 files changed +14
-12
lines changed
spring-web/src/main/java/org/springframework/http/server/reactive
3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -163,11 +163,11 @@ protected void writingComplete() {
163
163
}
164
164
165
165
/**
166
- * Invoked when an error happens while writing. Defaults to no-op.
167
- * Servlet 3.1 based implementations will receive
168
- * {@link WriteListener#onError(Throwable)} event.
166
+ * Invoked when an error happens while writing.
167
+ * <p>Defaults to no-op. Servlet 3.1 based implementations will receive
168
+ * {@code javax.servlet. WriteListener#onError(Throwable)} event.
169
169
*/
170
- protected void writingFailed (Throwable t ) {
170
+ protected void writingFailed (Throwable ex ) {
171
171
}
172
172
173
173
Original file line number Diff line number Diff line change @@ -192,9 +192,10 @@ public void onError(AsyncEvent event) {
192
192
}
193
193
194
194
void handleError (Throwable ex ) {
195
- if (bodyFlushProcessor != null ) {
196
- bodyFlushProcessor .cancel ();
197
- bodyFlushProcessor .onError (ex );
195
+ ResponseBodyFlushProcessor flushProcessor = bodyFlushProcessor ;
196
+ if (flushProcessor != null ) {
197
+ flushProcessor .cancel ();
198
+ flushProcessor .onError (ex );
198
199
}
199
200
200
201
ResponseBodyProcessor processor = bodyProcessor ;
@@ -206,9 +207,10 @@ void handleError(Throwable ex) {
206
207
207
208
@ Override
208
209
public void onComplete (AsyncEvent event ) {
209
- if (bodyFlushProcessor != null ) {
210
- bodyFlushProcessor .cancel ();
211
- bodyFlushProcessor .onComplete ();
210
+ ResponseBodyFlushProcessor flushProcessor = bodyFlushProcessor ;
211
+ if (flushProcessor != null ) {
212
+ flushProcessor .cancel ();
213
+ flushProcessor .onComplete ();
212
214
}
213
215
214
216
ResponseBodyProcessor processor = bodyProcessor ;
Original file line number Diff line number Diff line change @@ -231,9 +231,9 @@ protected void writingComplete() {
231
231
}
232
232
233
233
@ Override
234
- protected void writingFailed (Throwable t ) {
234
+ protected void writingFailed (Throwable ex ) {
235
235
cancel ();
236
- onError (t );
236
+ onError (ex );
237
237
}
238
238
}
239
239
You can’t perform that action at this time.
0 commit comments