mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
98723: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 98580: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 98457: Merged NESS/4.2.N-2015-02-10 (4.2.5) to V4.2-BUG-FIX (4.2.5) 98405: MNT-13502 : Possible concurrency issue in StoreRedirectorProxyFactory - Used unmodifiable collection for redirectProtocolBindings and redirectedStoreBindings git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@98814 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -101,8 +101,16 @@ public class StoreRedirectorProxyFactory<I> implements FactoryBean, Initializing
|
|||||||
*/
|
*/
|
||||||
public void setRedirectedProtocolBindings(Map<String, I> protocolBindings)
|
public void setRedirectedProtocolBindings(Map<String, I> protocolBindings)
|
||||||
{
|
{
|
||||||
|
if (protocolBindings != null)
|
||||||
|
{
|
||||||
|
this.redirectedProtocolBindings = Collections.unmodifiableMap(protocolBindings);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logger.warn("Null map injected");
|
||||||
this.redirectedProtocolBindings = protocolBindings;
|
this.redirectedProtocolBindings = protocolBindings;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the binding of store type (protocol string) to component
|
* Sets the binding of store type (protocol string) to component
|
||||||
@@ -112,13 +120,14 @@ public class StoreRedirectorProxyFactory<I> implements FactoryBean, Initializing
|
|||||||
*/
|
*/
|
||||||
public void setRedirectedStoreBindings(Map<String, I> storeBindings)
|
public void setRedirectedStoreBindings(Map<String, I> storeBindings)
|
||||||
{
|
{
|
||||||
redirectedStoreBindings = new HashMap<StoreRef, I>(storeBindings.size());
|
|
||||||
for(String ref : storeBindings.keySet())
|
|
||||||
{
|
|
||||||
redirectedStoreBindings.put(new StoreRef(ref), storeBindings.get(ref));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Map<StoreRef, I> redirectedStoreBindingsMap = new HashMap<StoreRef, I>(storeBindings.size());
|
||||||
|
for (String ref : storeBindings.keySet())
|
||||||
|
{
|
||||||
|
redirectedStoreBindingsMap.put(new StoreRef(ref), storeBindings.get(ref));
|
||||||
|
}
|
||||||
|
redirectedStoreBindings = Collections.unmodifiableMap(redirectedStoreBindingsMap);
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||||
|
Reference in New Issue
Block a user