Replace magic number by HttpStatus

See gh-15130
This commit is contained in:
holy12345 2018-11-08 16:16:06 +08:00 committed by Stephane Nicoll
parent 9483c91d58
commit ffdc9f0ff3
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.boot.actuate.trace.http.TraceableResponse; import org.springframework.boot.actuate.trace.http.TraceableResponse;
import org.springframework.http.HttpStatus;
import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.http.server.reactive.ServerHttpResponse;
/** /**
@ -39,7 +40,7 @@ class TraceableServerHttpResponse implements TraceableResponse {
@Override @Override
public int getStatus() { public int getStatus() {
return (this.response.getStatusCode() != null) return (this.response.getStatusCode() != null)
? this.response.getStatusCode().value() : 200; ? this.response.getStatusCode().value() : HttpStatus.OK.value();
} }
@Override @Override