commit | 9e65c400d31b2f6e51c9d2a07dd4484011c5a713 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Fri Feb 09 14:49:02 2018 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Fri Feb 09 14:49:48 2018 +0100 |
tree | 941b43fa44c3644d92b1423e833281643e6d1133 | |
parent | 2c42f316091726ba34a4f3809cb20197d8a46575 [diff] |
Adapt to changes in Gerrit core ExternalId.USER_NAME_PATTERN_REGEX was made private. Instead ExternalId.isValidUsername should be used. Change-Id: I18467023a1a9bff012e33634b28c6e9892ffe79e Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/singleusergroup/SingleUserGroup.java b/src/main/java/com/googlesource/gerrit/plugins/singleusergroup/SingleUserGroup.java index e31c3d0..33b649a 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/singleusergroup/SingleUserGroup.java +++ b/src/main/java/com/googlesource/gerrit/plugins/singleusergroup/SingleUserGroup.java
@@ -108,7 +108,7 @@ Optional<AccountState> state; if (ident.matches(ACCOUNT_ID_PATTERN)) { state = accountCache.get(new Account.Id(Integer.parseInt(ident))); - } else if (ident.matches(ExternalId.USER_NAME_PATTERN_REGEX)) { + } else if (ExternalId.isValidUsername(ident)) { state = accountCache.getByUsername(ident); } else { return null;