GetAuditLog: Fix NPE if group UUID cannot be resolved
A group UUID cannot be resolved if there is no groupback that handles it. This can e.g. happen if the singleusergroup was used and single user groups have been added to Gerrit groups, but then the singleusergroup plugin was uninstalled. Change-Id: I87b83c3904172e8ff32cfd07c15e9a9951921c71 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -102,7 +102,9 @@ public class GetAuditLog implements RestReadView<GroupResource> {
|
||||
GroupDescription.Basic groupDescription = groupBackend.get(includedGroupUUID);
|
||||
member = new GroupInfo();
|
||||
member.id = Url.encode(includedGroupUUID.get());
|
||||
member.name = groupDescription.getName();
|
||||
if (groupDescription != null) {
|
||||
member.name = groupDescription.getName();
|
||||
}
|
||||
}
|
||||
|
||||
auditEvents.add(
|
||||
|
Reference in New Issue
Block a user