diff --git a/org.springframework.web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java b/org.springframework.web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java index 9ca65e7867..e93367b651 100644 --- a/org.springframework.web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java +++ b/org.springframework.web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java @@ -30,8 +30,6 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.Map; - -import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import org.springframework.http.HttpHeaders; @@ -114,15 +112,15 @@ public class ServletServerHttpRequest implements ServerHttpRequest { } private boolean isFormPost(HttpServletRequest request) { - return request.getContentType() != null && request.getContentType().contains(FORM_CONTENT_TYPE) && - (METHOD_POST.equalsIgnoreCase(request.getMethod())); + return (request.getContentType() != null && request.getContentType().contains(FORM_CONTENT_TYPE) && + METHOD_POST.equalsIgnoreCase(request.getMethod())); } /** - * Use {@link ServletRequest#getParameterMap()} to reconstruct the body of - * a form 'POST' providing a predictable outcome as opposed to reading - * from the body, which can fail if any other code has used ServletRequest - * to access a parameter thus causing the input stream to be "consumed". + * Use {@link javax.servlet.ServletRequest#getParameterMap()} to reconstruct the + * body of a form 'POST' providing a predictable outcome as opposed to reading + * from the body, which can fail if any other code has used ServletRequest + * to access a parameter thus causing the input stream to be "consumed". */ private InputStream getBodyFromServletRequestParameters(HttpServletRequest request) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); diff --git a/org.springframework.web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java b/org.springframework.web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java index 659baacfac..2aea01f187 100644 --- a/org.springframework.web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java +++ b/org.springframework.web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java @@ -49,7 +49,8 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler { * Template method called from {@link #hasError(ClientHttpResponse)}. *

The default implementation checks if the given status code is * {@link org.springframework.http.HttpStatus.Series#CLIENT_ERROR CLIENT_ERROR} - * or {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR SERVER_ERROR}. Can be overridden in subclasses. + * or {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR SERVER_ERROR}. + * Can be overridden in subclasses. * @param statusCode the HTTP status code * @return true if the response has an error; false otherwise */ @@ -59,11 +60,10 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler { } /** - * {@inheritDoc} - *

The default implementation throws a {@link HttpClientErrorException} if the response status code is - * {@link org.springframework.http.HttpStatus.Series#CLIENT_ERROR}, a {@link HttpServerErrorException} if it is - * {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR}, and a {@link RestClientException} in other - * cases. + * This default implementation throws a {@link HttpClientErrorException} if the response status code + * is {@link org.springframework.http.HttpStatus.Series#CLIENT_ERROR}, a {@link HttpServerErrorException} + * if it is {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR}, + * and a {@link RestClientException} in other cases. */ public void handleError(ClientHttpResponse response) throws IOException { HttpStatus statusCode = response.getStatusCode(); @@ -84,10 +84,9 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler { try { return FileCopyUtils.copyToByteArray(response.getBody()); } - catch (IOException e) { + catch (IOException ex) { return new byte[0]; } } } -