Browse Source

Polish "Replace magic number by HttpStatus"

Closes gh-15130
pull/15385/head
Stephane Nicoll 7 years ago
parent
commit
f2ca2533d5
  1. 5
      spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/trace/reactive/TraceableServerHttpResponse.java

5
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/trace/reactive/TraceableServerHttpResponse.java

@ -39,8 +39,9 @@ class TraceableServerHttpResponse implements TraceableResponse { @@ -39,8 +39,9 @@ class TraceableServerHttpResponse implements TraceableResponse {
@Override
public int getStatus() {
return (this.response.getStatusCode() != null)
? this.response.getStatusCode().value() : HttpStatus.OK.value();
HttpStatus status = (this.response.getStatusCode() != null)
? this.response.getStatusCode() : HttpStatus.OK;
return status.value();
}
@Override

Loading…
Cancel
Save