Skip to content

Commit 37b1342

Browse files
committed
Minor cleanup
1 parent ebc15af commit 37b1342

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/main/java/org/springframework/ws/transport/http/AbstractHttpSenderConnection.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public final String getErrorMessage() throws IOException {
5555
* Receiving response
5656
*/
5757
protected final boolean hasResponse() throws IOException {
58-
if (getResponseCode() == HttpTransportConstants.STATUS_ACCEPTED) {
58+
if (HttpTransportConstants.STATUS_ACCEPTED == getResponseCode()) {
5959
return false;
6060
}
6161
long contentLength = getResponseContentLength();
@@ -81,8 +81,8 @@ protected final InputStream getResponseInputStream() throws IOException {
8181

8282
/** Determine whether the given response is a GZIP response. */
8383
private boolean isGzipResponse() throws IOException {
84-
for (Iterator iterator = getResponseHeaders(HttpTransportConstants.HEADER_CONTENT_ENCODING);
85-
iterator.hasNext();) {
84+
Iterator iterator = getResponseHeaders(HttpTransportConstants.HEADER_CONTENT_ENCODING);
85+
if (iterator.hasNext()) {
8686
String encodingHeader = (String) iterator.next();
8787
return encodingHeader.toLowerCase().indexOf(HttpTransportConstants.CONTENT_ENCODING_GZIP) != -1;
8888
}

0 commit comments

Comments
 (0)