mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Polish
This commit is contained in:
+4
-4
@@ -163,11 +163,11 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked when an error happens while writing. Defaults to no-op.
|
||||
* Servlet 3.1 based implementations will receive
|
||||
* {@link WriteListener#onError(Throwable)} event.
|
||||
* Invoked when an error happens while writing.
|
||||
* <p>Defaults to no-op. Servlet 3.1 based implementations will receive
|
||||
* {@code javax.servlet.WriteListener#onError(Throwable)} event.
|
||||
*/
|
||||
protected void writingFailed(Throwable t) {
|
||||
protected void writingFailed(Throwable ex) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
+8
-6
@@ -192,9 +192,10 @@ public class ServletServerHttpResponse extends AbstractListenerServerHttpRespons
|
||||
}
|
||||
|
||||
void handleError(Throwable ex) {
|
||||
if (bodyFlushProcessor != null) {
|
||||
bodyFlushProcessor.cancel();
|
||||
bodyFlushProcessor.onError(ex);
|
||||
ResponseBodyFlushProcessor flushProcessor = bodyFlushProcessor;
|
||||
if (flushProcessor != null) {
|
||||
flushProcessor.cancel();
|
||||
flushProcessor.onError(ex);
|
||||
}
|
||||
|
||||
ResponseBodyProcessor processor = bodyProcessor;
|
||||
@@ -206,9 +207,10 @@ public class ServletServerHttpResponse extends AbstractListenerServerHttpRespons
|
||||
|
||||
@Override
|
||||
public void onComplete(AsyncEvent event) {
|
||||
if (bodyFlushProcessor != null) {
|
||||
bodyFlushProcessor.cancel();
|
||||
bodyFlushProcessor.onComplete();
|
||||
ResponseBodyFlushProcessor flushProcessor = bodyFlushProcessor;
|
||||
if (flushProcessor != null) {
|
||||
flushProcessor.cancel();
|
||||
flushProcessor.onComplete();
|
||||
}
|
||||
|
||||
ResponseBodyProcessor processor = bodyProcessor;
|
||||
|
||||
+2
-2
@@ -231,9 +231,9 @@ public class UndertowServerHttpResponse extends AbstractListenerServerHttpRespon
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writingFailed(Throwable t) {
|
||||
protected void writingFailed(Throwable ex) {
|
||||
cancel();
|
||||
onError(t);
|
||||
onError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user