mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix exception throw in FileFolderServiceImpl.getNameOnlyPath() to ensure only FileNotFoundException is thrown not RuntimeException to pass unit test.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@47484 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1466,6 +1466,15 @@ public class FileFolderServiceImpl implements FileFolderService
|
|||||||
{
|
{
|
||||||
throw new FileNotFoundException(nodeRef);
|
throw new FileNotFoundException(nodeRef);
|
||||||
}
|
}
|
||||||
|
catch (RuntimeException e)
|
||||||
|
{
|
||||||
|
// the runAs() is too keen on wrapping everything in an outer RuntimeException - which we don't want.
|
||||||
|
if (e.getCause() instanceof FileNotFoundException)
|
||||||
|
{
|
||||||
|
throw (FileNotFoundException)e.getCause();
|
||||||
|
}
|
||||||
|
else throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileInfo resolveNamePath(NodeRef rootNodeRef, List<String> pathElements) throws FileNotFoundException
|
public FileInfo resolveNamePath(NodeRef rootNodeRef, List<String> pathElements) throws FileNotFoundException
|
||||||
|
Reference in New Issue
Block a user