GroupDetail: Remove unused fields

Change-Id: I7cfa0291fad1c7ec516a96948d440c97a91118e4
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2017-02-06 11:39:34 +01:00
parent ae2a316527
commit 151235f0e3
2 changed files with 0 additions and 20 deletions

View File

@@ -24,8 +24,6 @@ public class GroupDetail {
public AccountGroup group;
public List<AccountGroupMember> members;
public List<AccountGroupById> includes;
public GroupReference ownerGroup;
public boolean canModify;
public GroupDetail() {
}
@@ -41,12 +39,4 @@ public class GroupDetail {
public void setIncludes(List<AccountGroupById> i) {
includes = i;
}
public void setOwnerGroup(GroupReference g) {
ownerGroup = g;
}
public void setCanModify(final boolean canModify) {
this.canModify = canModify;
}
}

View File

@@ -14,9 +14,7 @@
package com.google.gerrit.server.account;
import com.google.gerrit.common.data.GroupDescription;
import com.google.gerrit.common.data.GroupDetail;
import com.google.gerrit.common.data.GroupReference;
import com.google.gerrit.common.errors.NoSuchGroupException;
import com.google.gerrit.reviewdb.client.AccountGroup;
import com.google.gerrit.reviewdb.client.AccountGroupById;
@@ -38,7 +36,6 @@ public class GroupDetailFactory implements Callable<GroupDetail> {
private final ReviewDb db;
private final GroupControl.Factory groupControl;
private final GroupCache groupCache;
private final GroupBackend groupBackend;
private final AccountGroup.Id groupId;
private GroupControl control;
@@ -47,12 +44,10 @@ public class GroupDetailFactory implements Callable<GroupDetail> {
GroupDetailFactory(ReviewDb db,
GroupControl.Factory groupControl,
GroupCache groupCache,
GroupBackend groupBackend,
@Assisted AccountGroup.Id groupId) {
this.db = db;
this.groupControl = groupControl;
this.groupCache = groupCache;
this.groupBackend = groupBackend;
this.groupId = groupId;
}
@@ -63,13 +58,8 @@ public class GroupDetailFactory implements Callable<GroupDetail> {
AccountGroup group = groupCache.get(groupId);
GroupDetail detail = new GroupDetail();
detail.setGroup(group);
GroupDescription.Basic ownerGroup = groupBackend.get(group.getOwnerGroupUUID());
if (ownerGroup != null) {
detail.setOwnerGroup(GroupReference.forGroup(ownerGroup));
}
detail.setMembers(loadMembers());
detail.setIncludes(loadIncludes());
detail.setCanModify(control.isOwner());
return detail;
}