mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix unit tests: unwrap InvocationTargetExceptions thrown by subsystems
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13682 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
package org.alfresco.repo.management;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -57,6 +58,8 @@ public class ManagedSubsystemProxyFactory extends ProxyFactoryBean
|
||||
public Object invoke(MethodInvocation mi) throws Throwable
|
||||
{
|
||||
Method method = mi.getMethod();
|
||||
try
|
||||
{
|
||||
if (ManagedSubsystemProxyFactory.this.sourceBeanName == null)
|
||||
{
|
||||
Map<?, ?> beans = ManagedSubsystemProxyFactory.this.sourceApplicationContextFactory
|
||||
@@ -75,6 +78,12 @@ public class ManagedSubsystemProxyFactory extends ProxyFactoryBean
|
||||
|
||||
}
|
||||
}
|
||||
catch (InvocationTargetException e)
|
||||
{
|
||||
// Unwrap invocation target exceptions
|
||||
throw e.getTargetException();
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user