mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Change the behavior of AVMService.getAVMStore() and AVMService.lookup()
methods to return null for not found instead of throwing an exception. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -61,12 +61,11 @@ public class OutputUtil
|
|||||||
LOGGER.debug("computed avm path " + PARENT_AVM_PATH + "/" + parentName);
|
LOGGER.debug("computed avm path " + PARENT_AVM_PATH + "/" + parentName);
|
||||||
final String result = PARENT_AVM_PATH + "/" + parentName;
|
final String result = PARENT_AVM_PATH + "/" + parentName;
|
||||||
AVMService avmService = (AVMService)AVMContext.fgInstance.fAppContext.getBean("avmService");
|
AVMService avmService = (AVMService)AVMContext.fgInstance.fAppContext.getBean("avmService");
|
||||||
try
|
if (avmService.lookup(-1, result) != null)
|
||||||
{
|
{
|
||||||
avmService.lookup(-1, result);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
catch (AVMNotFoundException notFound)
|
else
|
||||||
{
|
{
|
||||||
// avmService.createDirectory(PARENT_AVM_PATH, parentName);
|
// avmService.createDirectory(PARENT_AVM_PATH, parentName);
|
||||||
return PARENT_AVM_PATH;
|
return PARENT_AVM_PATH;
|
||||||
|
Reference in New Issue
Block a user