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
This commit is contained in:
Alan Davis
2016-11-10 16:58:30 +00:00
parent 24a4547b3b
commit ce22f54f19

View File

@@ -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)