fixed exception propagation issue with Hessian 4.0 (SPR-6899)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3056 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2010-03-04 22:22:47 +00:00
parent 117cfeff3d
commit 1ea544250f
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -223,6 +223,10 @@ public class HessianClientInterceptor extends UrlBasedRemoteAccessor implements
}
catch (InvocationTargetException ex) {
Throwable targetEx = ex.getTargetException();
// Hessian 4.0 check: another layer of InvocationTargetException.
if (targetEx instanceof InvocationTargetException) {
targetEx = ((InvocationTargetException) targetEx).getTargetException();
}
if (targetEx instanceof HessianConnectionException) {
throw convertHessianAccessException(targetEx);
}