Fix PluginConfig.setGroupReference method

When the group reference was a new one, i.e. not already in the groups
file, it was not added to the groups file when saving the project
config.

Change-Id: If40bcc3fae8c1966bda21adc1b6d46d63b88e4ec
This commit is contained in:
Hugo Arès
2017-06-21 08:33:09 -04:00
parent dde983b1b2
commit 8ba2366a1f
3 changed files with 17 additions and 2 deletions

View File

@@ -414,7 +414,13 @@ public class ProjectConfig extends VersionedMetaData implements ValidationError.
}
public GroupReference resolve(GroupReference group) {
return groupList.resolve(group);
GroupReference groupRef = groupList.resolve(group);
if (groupRef != null
&& groupRef.getUUID() != null
&& !groupsByName.containsKey(groupRef.getName())) {
groupsByName.put(groupRef.getName(), groupRef);
}
return groupRef;
}
/** @return the group reference, if the group is used by at least one rule. */