Polish AbstractServerHttpResponse
This commit simplifies the logic for applying beforeCommit actions replacing the use of chained Mono.then calls with a single Flux.concat. Also renamed writeStatusCode, writeHeaders, and writeCookies to applyStatusCode, applyHeaders, and applyCookies respectively to better reflect we're simply setting them on the underlying response (not necessarily written yet).
This commit is contained in:
@@ -158,19 +158,19 @@ public class ServerHttpResponseTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeStatusCode() {
|
||||
public void applyStatusCode() {
|
||||
assertFalse(this.statusCodeWritten);
|
||||
this.statusCodeWritten = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeHeaders() {
|
||||
protected void applyHeaders() {
|
||||
assertFalse(this.headersWritten);
|
||||
this.headersWritten = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeCookies() {
|
||||
protected void applyCookies() {
|
||||
assertFalse(this.cookiesWritten);
|
||||
this.cookiesWritten = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user