Skip to content

Commit e95e40a

Browse files
committed
SWS-308 in 1.0 branch
1 parent d52da4c commit e95e40a

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
@@ -458,16 +458,16 @@ public Object sendAndReceive(String uri,
458458
* @throws IOException in case of I/O errors
459459
*/
460460
protected boolean hasError(WebServiceConnection connection, WebServiceMessage request) throws IOException {
461-
if (!connection.hasError()) {
462-
return false;
463-
}
464-
if (checkConnectionForFault && connection instanceof FaultAwareWebServiceConnection) {
465-
FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection;
466-
return !(faultConnection.hasFault() && request instanceof FaultAwareWebServiceMessage);
467-
}
468-
else {
469-
return checkConnectionForFault;
461+
if (connection.hasError() && checkConnectionForFault) {
462+
if (connection instanceof FaultAwareWebServiceConnection) {
463+
FaultAwareWebServiceConnection faultConnection = (FaultAwareWebServiceConnection) connection;
464+
return !(faultConnection.hasFault() && request instanceof FaultAwareWebServiceMessage);
465+
}
466+
else {
467+
return true;
468+
}
470469
}
470+
return false;
471471
}
472472

473473
/**

0 commit comments

Comments
 (0)