diff --git a/org.springframework.web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java b/org.springframework.web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java index f8adbdc2794..8224902b913 100644 --- a/org.springframework.web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java +++ b/org.springframework.web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java @@ -64,7 +64,7 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest /** - * Create a new instance of the {@code HttpComponentsClientHttpRequestFactory} with a default + * Create a new instance of the HttpComponentsClientHttpRequestFactory with a default * {@link HttpClient} that uses a default {@link org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager}. */ public HttpComponentsClientHttpRequestFactory() { @@ -82,9 +82,9 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest /** - * Create a new instance of the {@code HttpComponentsClientHttpRequestFactory} + * Create a new instance of the HttpComponentsClientHttpRequestFactory * with the given {@link HttpClient} instance. - * @param httpClient the HttpClient instance to use for this factory + * @param httpClient the HttpClient instance to use for this request factory */ public HttpComponentsClientHttpRequestFactory(HttpClient httpClient) { Assert.notNull(httpClient, "HttpClient must not be null"); @@ -110,7 +110,6 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest * Set the connection timeout for the underlying HttpClient. * A timeout value of 0 specifies an infinite timeout. * @param timeout the timeout value in milliseconds - * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setConnectionTimeout(int) */ public void setConnectTimeout(int timeout) { Assert.isTrue(timeout < 0, "Timeout must be a non-negative value"); @@ -121,7 +120,6 @@ public class HttpComponentsClientHttpRequestFactory implements ClientHttpRequest * Set the socket read timeout for the underlying HttpClient. * A timeout value of 0 specifies an infinite timeout. * @param timeout the timeout value in milliseconds - * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setSoTimeout(int) */ public void setReadTimeout(int timeout) { Assert.isTrue(timeout < 0, "Timeout must be a non-negative value"); diff --git a/org.springframework.web/src/main/java/org/springframework/remoting/httpinvoker/CommonsHttpInvokerRequestExecutor.java b/org.springframework.web/src/main/java/org/springframework/remoting/httpinvoker/CommonsHttpInvokerRequestExecutor.java index ad841afa887..548721498f5 100644 --- a/org.springframework.web/src/main/java/org/springframework/remoting/httpinvoker/CommonsHttpInvokerRequestExecutor.java +++ b/org.springframework.web/src/main/java/org/springframework/remoting/httpinvoker/CommonsHttpInvokerRequestExecutor.java @@ -171,10 +171,9 @@ public class CommonsHttpInvokerRequestExecutor extends AbstractHttpInvokerReques /** * Set the given serialized remote invocation as request body. - *
The default implementation simply sets the serialized invocation - * as the PostMethod's request body. This can be overridden, for example, - * to write a specific encoding and potentially set appropriate HTTP - * request headers. + *
The default implementation simply sets the serialized invocation as the + * PostMethod's request body. This can be overridden, for example, to write a + * specific encoding and to potentially set appropriate HTTP request headers. * @param config the HTTP invoker configuration that specifies the target service * @param postMethod the PostMethod to set the request body on * @param baos the ByteArrayOutputStream that contains the serialized @@ -228,11 +227,10 @@ public class CommonsHttpInvokerRequestExecutor extends AbstractHttpInvokerReques } /** - * Extract the response body from the given executed remote invocation - * request. - *
The default implementation simply fetches the PostMethod's response - * body stream. If the response is recognized as GZIP response, the - * InputStream will get wrapped in a GZIPInputStream. + * Extract the response body from the given executed remote invocation request. + *
The default implementation simply fetches the PostMethod's response body stream. + * If the response is recognized as GZIP response, the InputStream will get wrapped + * in a GZIPInputStream. * @param config the HTTP invoker configuration that specifies the target service * @param postMethod the PostMethod to read the response body from * @return an InputStream for the response body @@ -255,7 +253,7 @@ public class CommonsHttpInvokerRequestExecutor extends AbstractHttpInvokerReques /** * Determine whether the given response indicates a GZIP response. - *
Default implementation checks whether the HTTP "Content-Encoding" + *
The default implementation checks whether the HTTP "Content-Encoding" * header contains "gzip" (in any casing). * @param postMethod the PostMethod to check * @return whether the given response indicates a GZIP response @@ -263,7 +261,7 @@ public class CommonsHttpInvokerRequestExecutor extends AbstractHttpInvokerReques protected boolean isGzipResponse(PostMethod postMethod) { Header encodingHeader = postMethod.getResponseHeader(HTTP_HEADER_CONTENT_ENCODING); return (encodingHeader != null && encodingHeader.getValue() != null && - encodingHeader.getValue().toLowerCase().indexOf(ENCODING_GZIP) != -1); + encodingHeader.getValue().toLowerCase().contains(ENCODING_GZIP)); } }