Consistent "this." reference to local variable

This commit is contained in:
Juergen Hoeller 2012-10-04 13:26:39 +02:00 committed by unknown
parent 9ff640a95d
commit 8bdc6be074
1 changed files with 5 additions and 3 deletions

View File

@ -47,6 +47,7 @@ public class ResponseEntity<T> extends HttpEntity<T> {
private final HttpStatus statusCode; private final HttpStatus statusCode;
/** /**
* Create a new {@code ResponseEntity} with the given status code, and no body nor headers. * Create a new {@code ResponseEntity} with the given status code, and no body nor headers.
* @param statusCode the status code * @param statusCode the status code
@ -87,12 +88,13 @@ public class ResponseEntity<T> extends HttpEntity<T> {
this.statusCode = statusCode; this.statusCode = statusCode;
} }
/** /**
* Return the HTTP status code of the response. * Return the HTTP status code of the response.
* @return the HTTP status as an HttpStatus enum value * @return the HTTP status as an HttpStatus enum value
*/ */
public HttpStatus getStatusCode() { public HttpStatus getStatusCode() {
return statusCode; return this.statusCode;
} }
@Override @Override
@ -115,9 +117,9 @@ public class ResponseEntity<T> extends HttpEntity<T> {
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder("<"); StringBuilder builder = new StringBuilder("<");
builder.append(statusCode.toString()); builder.append(this.statusCode.toString());
builder.append(' '); builder.append(' ');
builder.append(statusCode.getReasonPhrase()); builder.append(this.statusCode.getReasonPhrase());
builder.append(','); builder.append(',');
T body = getBody(); T body = getBody();
HttpHeaders headers = getHeaders(); HttpHeaders headers = getHeaders();