REPO-1752: Create person with long id returns 500

- Changed validation message.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@134050 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Raluca Munteanu
2017-01-05 13:23:59 +00:00
parent 236cd318aa
commit bad483f217

View File

@@ -86,6 +86,7 @@ public class PeopleImpl implements People
NamespaceService.CONTENT_MODEL_1_0_URI);
private static final List<QName> EXCLUDED_ASPECTS = Arrays.asList();
private static final List<QName> 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)