From 99588950d2034669f29e2be49e9a5c6fcd9b5423 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 15 Aug 2011 21:24:41 +0000 Subject: [PATCH] polishing --- .../CommonsHttpInvokerRequestExecutor.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) 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 ad841afa88..548721498f 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)); } }