Fix NPE after last re-factor.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2629 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2006-04-06 09:29:12 +00:00
parent 00c36aab57
commit 9ccc49da31

View File

@@ -121,6 +121,7 @@ public class StoreRedirectorProxyFactory<I> implements FactoryBean, Initializing
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/ */
@SuppressWarnings("unchecked")
public void afterPropertiesSet() throws ServiceException public void afterPropertiesSet() throws ServiceException
{ {
ParameterCheck.mandatory("Proxy Interface", proxyInterface); ParameterCheck.mandatory("Proxy Interface", proxyInterface);
@@ -228,7 +229,7 @@ public class StoreRedirectorProxyFactory<I> implements FactoryBean, Initializing
{ {
StoreRef storeRef = null; StoreRef storeRef = null;
if(args == null) if (args == null)
{ {
return null; return null;
} }
@@ -239,7 +240,10 @@ public class StoreRedirectorProxyFactory<I> implements FactoryBean, Initializing
StoreRef argStoreRef = null; StoreRef argStoreRef = null;
if (argTypes[i].equals(NodeRef.class)) if (argTypes[i].equals(NodeRef.class))
{ {
argStoreRef = ((NodeRef) args[i]).getStoreRef(); if (args[i] != null)
{
argStoreRef = ((NodeRef) args[i]).getStoreRef();
}
} }
else if (argTypes[i].equals(StoreRef.class)) else if (argTypes[i].equals(StoreRef.class))
{ {