From ce22f54f1922c4b81ebb98dde0b5be93431ea91f Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Thu, 10 Nov 2016 16:58:30 +0000 Subject: [PATCH] Merged 5.2.N (5.2.1) to HEAD (5.2) 132473 mward: REPO-1536: corrected 404 error message for get person by ID (/person/{id}) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@132667 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/rest/api/impl/PeopleImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/rest/api/impl/PeopleImpl.java b/source/java/org/alfresco/rest/api/impl/PeopleImpl.java index 40f2e3ba3a..18f716ba2d 100644 --- a/source/java/org/alfresco/rest/api/impl/PeopleImpl.java +++ b/source/java/org/alfresco/rest/api/impl/PeopleImpl.java @@ -153,8 +153,9 @@ public class PeopleImpl implements People return validatePerson(personId, false); } - public String validatePerson(String personId, boolean validateIsCurrentUser) + public String validatePerson(final String requestedPersonId, boolean validateIsCurrentUser) { + String personId = requestedPersonId; if(personId == null) { throw new InvalidArgumentException("personId is null."); @@ -168,8 +169,8 @@ public class PeopleImpl implements People personId = personService.getUserIdentifier(personId); if(personId == null) { - // "User " + personId + " does not exist" - throw new EntityNotFoundException("personId is null."); + // Could not find canonical user ID by case-sensitive ID. + throw new EntityNotFoundException(requestedPersonId); } if(validateIsCurrentUser)