Browse Source

Consistent "this." reference to local variable

3.1.x
Juergen Hoeller 14 years ago
parent
commit
cb7d689f92
  1. 10
      org.springframework.web/src/main/java/org/springframework/http/ResponseEntity.java

10
org.springframework.web/src/main/java/org/springframework/http/ResponseEntity.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2011 the original author or authors. * Copyright 2002-2012 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -46,6 +46,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
@ -86,20 +87,21 @@ 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
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();

Loading…
Cancel
Save