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:
Kevin Roast
2013-03-04 09:23:11 +00:00
parent 2c920d57cc
commit b029353cfc

View File

@@ -1466,6 +1466,15 @@ public class FileFolderServiceImpl implements FileFolderService
{
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