Return rather than throw converted http exception
Fix HttpInvokerClientInterceptor.convertHttpInvokerAccessException to return the translated exception rather than throwing it. This brings the method implementation in line with the Java Doc and the obvious original intent. Issue: SPR-10965
This commit is contained in:
@@ -202,18 +202,18 @@ public class HttpInvokerClientInterceptor extends RemoteInvocationBasedAccessor
|
|||||||
*/
|
*/
|
||||||
protected RemoteAccessException convertHttpInvokerAccessException(Throwable ex) {
|
protected RemoteAccessException convertHttpInvokerAccessException(Throwable ex) {
|
||||||
if (ex instanceof ConnectException) {
|
if (ex instanceof ConnectException) {
|
||||||
throw new RemoteConnectFailureException(
|
return new RemoteConnectFailureException(
|
||||||
"Could not connect to HTTP invoker remote service at [" + getServiceUrl() + "]", ex);
|
"Could not connect to HTTP invoker remote service at [" + getServiceUrl() + "]", ex);
|
||||||
}
|
}
|
||||||
else if (ex instanceof ClassNotFoundException || ex instanceof NoClassDefFoundError ||
|
|
||||||
|
if (ex instanceof ClassNotFoundException || ex instanceof NoClassDefFoundError ||
|
||||||
ex instanceof InvalidClassException) {
|
ex instanceof InvalidClassException) {
|
||||||
throw new RemoteAccessException(
|
return new RemoteAccessException(
|
||||||
"Could not deserialize result from HTTP invoker remote service [" + getServiceUrl() + "]", ex);
|
"Could not deserialize result from HTTP invoker remote service [" + getServiceUrl() + "]", ex);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
throw new RemoteAccessException(
|
return new RemoteAccessException(
|
||||||
"Could not access HTTP invoker remote service at [" + getServiceUrl() + "]", ex);
|
"Could not access HTTP invoker remote service at [" + getServiceUrl() + "]", ex);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user