Skip to content

Commit ee8985c

Browse files
committed
SWS-308
1 parent 72d0e68 commit ee8985c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

core/src/main/java/org/springframework/ws/client/core/WebServiceTemplate.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -530,16 +530,16 @@ else if (messageTracingLogger.isDebugEnabled()) {
530530
* @throws IOException in case of I/O errors
531531
*/
532532
protected boolean hasError(WebServiceConnection connection, WebServiceMessage request) throws IOException {
533-
if (!connection.hasError()) {
534-
return false;
535-
}
536-
if (checkConnectionForFault && connection instanceof FaultAwareWebServiceConnection) {
537-
FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection;
538-
return !(faultConnection.hasFault() && request instanceof FaultAwareWebServiceMessage);
539-
}
540-
else {
541-
return checkConnectionForFault;
533+
if (connection.hasError() && checkConnectionForFault) {
534+
if (connection instanceof FaultAwareWebServiceConnection) {
535+
FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection;
536+
return !(faultConnection.hasFault() && request instanceof FaultAwareWebServiceMessage);
537+
}
538+
else {
539+
return true;
540+
}
542541
}
542+
return false;
543543
}
544544

545545
/**

0 commit comments

Comments
 (0)