Merge pull request #15130 from holy12345
* pr/15130: Polish "Replace magic number by HttpStatus" Replace magic number by HttpStatus
This commit is contained in:
@@ -21,6 +21,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.boot.actuate.trace.http.TraceableResponse;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
|
||||
/**
|
||||
@@ -38,8 +39,9 @@ class TraceableServerHttpResponse implements TraceableResponse {
|
||||
|
||||
@Override
|
||||
public int getStatus() {
|
||||
return (this.response.getStatusCode() != null)
|
||||
? this.response.getStatusCode().value() : 200;
|
||||
HttpStatus status = (this.response.getStatusCode() != null)
|
||||
? this.response.getStatusCode() : HttpStatus.OK;
|
||||
return status.value();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user