Add method to extract group name from a configured value

Change-Id: I4c78383f1a71670fe0c3cc68d88e40e5e849cf97
This commit is contained in:
Hugo Arès
2017-06-19 11:21:08 -04:00
parent 2c8f60591a
commit 9aba030311
3 changed files with 14 additions and 5 deletions

View File

@@ -640,8 +640,8 @@ public class ProjectConfig extends VersionedMetaData implements ValidationError.
n.setHeader(rc.getEnum(NOTIFY, sectionName, KEY_HEADER, NotifyConfig.Header.BCC));
for (String dst : rc.getStringList(NOTIFY, sectionName, KEY_EMAIL)) {
if (GroupReference.isGroupReference(dst)) {
String groupName = dst.substring(6).trim();
String groupName = GroupReference.extractGroupName(dst);
if (groupName != null) {
GroupReference ref = groupsByName.get(groupName);
if (ref == null) {
ref = new GroupReference(null, groupName);