diff --git a/org.springframework.web/src/main/java/org/springframework/http/ResponseEntity.java b/org.springframework.web/src/main/java/org/springframework/http/ResponseEntity.java index 26ff6e0f0a..827e8333e3 100644 --- a/org.springframework.web/src/main/java/org/springframework/http/ResponseEntity.java +++ b/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"); * you may not use this file except in compliance with the License. @@ -46,6 +46,7 @@ public class ResponseEntity extends HttpEntity { private final HttpStatus statusCode; + /** * Create a new {@code ResponseEntity} with the given status code, and no body nor headers. * @param statusCode the status code @@ -86,20 +87,21 @@ public class ResponseEntity extends HttpEntity { this.statusCode = statusCode; } + /** * Return the HTTP status code of the response. * @return the HTTP status as an HttpStatus enum value */ public HttpStatus getStatusCode() { - return statusCode; + return this.statusCode; } @Override public String toString() { StringBuilder builder = new StringBuilder("<"); - builder.append(statusCode.toString()); + builder.append(this.statusCode.toString()); builder.append(' '); - builder.append(statusCode.getReasonPhrase()); + builder.append(this.statusCode.getReasonPhrase()); builder.append(','); T body = getBody(); HttpHeaders headers = getHeaders();