Merge branch 'stable-2.15' into stable-2.16
* stable-2.15: Set version to 2.15.19-SNAPSHOT Set version to 2.15.18 ReviewerUtil: Keep only AccountLoader.Factory ListMembers: Keep only AccountLoader.Factory in REST handler Change-Id: Id464418559ae4a390aceabf96d4b1ac96729df45
This commit is contained in:
@@ -45,7 +45,7 @@ import org.kohsuke.args4j.Option;
|
||||
public class ListMembers implements RestReadView<GroupResource> {
|
||||
private final GroupCache groupCache;
|
||||
private final GroupControl.Factory groupControlFactory;
|
||||
private final AccountLoader accountLoader;
|
||||
private final AccountLoader.Factory accountLoaderFactory;
|
||||
|
||||
@Option(name = "--recursive", usage = "to resolve included groups recursively")
|
||||
private boolean recursive;
|
||||
@@ -57,7 +57,7 @@ public class ListMembers implements RestReadView<GroupResource> {
|
||||
AccountLoader.Factory accountLoaderFactory) {
|
||||
this.groupCache = groupCache;
|
||||
this.groupControlFactory = groupControlFactory;
|
||||
this.accountLoader = accountLoaderFactory.create(true);
|
||||
this.accountLoaderFactory = accountLoaderFactory;
|
||||
}
|
||||
|
||||
public ListMembers setRecursive(boolean recursive) {
|
||||
@@ -112,6 +112,7 @@ public class ListMembers implements RestReadView<GroupResource> {
|
||||
|
||||
private List<AccountInfo> toAccountInfos(Set<Account.Id> members)
|
||||
throws PermissionBackendException {
|
||||
AccountLoader accountLoader = accountLoaderFactory.create(true);
|
||||
List<AccountInfo> memberInfos = new ArrayList<>(members.size());
|
||||
for (Account.Id member : members) {
|
||||
memberInfos.add(accountLoader.get(member));
|
||||
|
||||
Reference in New Issue
Block a user