From 9ccc49da31edce60bfb243cb75714e560dbd77c3 Mon Sep 17 00:00:00 2001 From: David Caruana Date: Thu, 6 Apr 2006 09:29:12 +0000 Subject: [PATCH] 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 --- .../repo/service/StoreRedirectorProxyFactory.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/service/StoreRedirectorProxyFactory.java b/source/java/org/alfresco/repo/service/StoreRedirectorProxyFactory.java index 7273002c3e..fe3fa2955f 100644 --- a/source/java/org/alfresco/repo/service/StoreRedirectorProxyFactory.java +++ b/source/java/org/alfresco/repo/service/StoreRedirectorProxyFactory.java @@ -121,6 +121,7 @@ public class StoreRedirectorProxyFactory implements FactoryBean, Initializing /* (non-Javadoc) * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ + @SuppressWarnings("unchecked") public void afterPropertiesSet() throws ServiceException { ParameterCheck.mandatory("Proxy Interface", proxyInterface); @@ -228,7 +229,7 @@ public class StoreRedirectorProxyFactory implements FactoryBean, Initializing { StoreRef storeRef = null; - if(args == null) + if (args == null) { return null; } @@ -239,7 +240,10 @@ public class StoreRedirectorProxyFactory implements FactoryBean, Initializing StoreRef argStoreRef = null; 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)) {