From ac7d35a8a89948eabf9715bf701751a71722badf Mon Sep 17 00:00:00 2001 From: Ancuta Morarasu Date: Wed, 11 May 2016 12:12:21 +0000 Subject: [PATCH] Merged HEAD (5.2) to 5.2.N (5.2.1) 126582 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 124741 jkaabimofrad: RA-895: fixed the error message when the relativePath does not exist. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126927 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/rest/api/impl/NodesImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/rest/api/impl/NodesImpl.java b/source/java/org/alfresco/rest/api/impl/NodesImpl.java index 7d697d7735..76db8aaf43 100644 --- a/source/java/org/alfresco/rest/api/impl/NodesImpl.java +++ b/source/java/org/alfresco/rest/api/impl/NodesImpl.java @@ -669,7 +669,6 @@ public class NodesImpl implements Nodes */ } - FileInfo fileInfo = null; try { @@ -682,14 +681,14 @@ public class NodesImpl implements Nodes fileInfo = fileFolderService.getFileInfo(parentNodeRef); if (fileInfo == null) { - throw new FileNotFoundException(parentNodeRef); + throw new EntityNotFoundException(parentNodeRef.getId()); } } } catch (FileNotFoundException fnfe) { // convert checked exception - throw new EntityNotFoundException(parentNodeRef.getId()); + throw new NotFoundException("The entity with relativePath: " + path + " was not found."); } return fileInfo.getNodeRef();