From 986b7ae73de28511a3387134edebf7ba45d90704 Mon Sep 17 00:00:00 2001 From: Andrei Rebegea Date: Wed, 14 Jun 2017 16:56:20 +0000 Subject: [PATCH] Merged 5.2.N (5.2.2) to HEAD (5.2) 134050 rmunteanu: REPO-1752: Create person with long id returns 500 - Changed validation message. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@137335 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/rest/api/impl/PeopleImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/rest/api/impl/PeopleImpl.java b/source/java/org/alfresco/rest/api/impl/PeopleImpl.java index cf3e5a589b..dbe6a6969b 100644 --- a/source/java/org/alfresco/rest/api/impl/PeopleImpl.java +++ b/source/java/org/alfresco/rest/api/impl/PeopleImpl.java @@ -86,6 +86,7 @@ public class PeopleImpl implements People NamespaceService.CONTENT_MODEL_1_0_URI); private static final List EXCLUDED_ASPECTS = Arrays.asList(); private static final List EXCLUDED_PROPS = Arrays.asList(); + private static final int USERNAME_MAXLENGTH = 100; protected Nodes nodes; protected Sites sites; @@ -523,7 +524,7 @@ public class PeopleImpl implements People { if (username.length() > 100) { - throw new InvalidArgumentException("Username is too long."); + throw new InvalidArgumentException("Username exceeds max length of " + USERNAME_MAXLENGTH + " characters."); } if (username.indexOf('/') != -1)