Skip to content

Commit 8bdc6be

Browse files
jhoellerunknown
authored andcommitted
Consistent "this." reference to local variable
1 parent 9ff640a commit 8bdc6be

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spring-web/src/main/java/org/springframework/http/ResponseEntity.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class ResponseEntity<T> extends HttpEntity<T> {
4747

4848
private final HttpStatus statusCode;
4949

50+
5051
/**
5152
* Create a new {@code ResponseEntity} with the given status code, and no body nor headers.
5253
* @param statusCode the status code
@@ -87,12 +88,13 @@ public ResponseEntity(T body, MultiValueMap<String, String> headers, HttpStatus
8788
this.statusCode = statusCode;
8889
}
8990

91+
9092
/**
9193
* Return the HTTP status code of the response.
9294
* @return the HTTP status as an HttpStatus enum value
9395
*/
9496
public HttpStatus getStatusCode() {
95-
return statusCode;
97+
return this.statusCode;
9698
}
9799

98100
@Override
@@ -115,9 +117,9 @@ public int hashCode() {
115117
@Override
116118
public String toString() {
117119
StringBuilder builder = new StringBuilder("<");
118-
builder.append(statusCode.toString());
120+
builder.append(this.statusCode.toString());
119121
builder.append(' ');
120-
builder.append(statusCode.getReasonPhrase());
122+
builder.append(this.statusCode.getReasonPhrase());
121123
builder.append(',');
122124
T body = getBody();
123125
HttpHeaders headers = getHeaders();

0 commit comments

Comments
 (0)