Merge branch 'stable-2.16' into stable-3.0

* stable-2.16:
  Set version to 2.15.19-SNAPSHOT
  Set version to 2.15.18
  ReviewerUtil: Keep only AccountLoader.Factory
  Update highlight.js
  Highlight VHDL
  ListMembers: Keep only AccountLoader.Factory in REST handler

Change-Id: I3d38dfe5ea06abaee05b2d6599f9321868821988
This commit is contained in:
David Pursehouse
2019-11-07 14:01:21 +09:00
3 changed files with 260 additions and 252 deletions

View File

@@ -44,7 +44,7 @@ import org.kohsuke.args4j.Option;
public class ListMembers implements RestReadView<GroupResource> { public class ListMembers implements RestReadView<GroupResource> {
private final GroupCache groupCache; private final GroupCache groupCache;
private final GroupControl.Factory groupControlFactory; private final GroupControl.Factory groupControlFactory;
private final AccountLoader accountLoader; private final AccountLoader.Factory accountLoaderFactory;
@Option(name = "--recursive", usage = "to resolve included groups recursively") @Option(name = "--recursive", usage = "to resolve included groups recursively")
private boolean recursive; private boolean recursive;
@@ -56,7 +56,7 @@ public class ListMembers implements RestReadView<GroupResource> {
AccountLoader.Factory accountLoaderFactory) { AccountLoader.Factory accountLoaderFactory) {
this.groupCache = groupCache; this.groupCache = groupCache;
this.groupControlFactory = groupControlFactory; this.groupControlFactory = groupControlFactory;
this.accountLoader = accountLoaderFactory.create(true); this.accountLoaderFactory = accountLoaderFactory;
} }
public ListMembers setRecursive(boolean recursive) { public ListMembers setRecursive(boolean recursive) {
@@ -111,6 +111,7 @@ public class ListMembers implements RestReadView<GroupResource> {
private List<AccountInfo> toAccountInfos(Set<Account.Id> members) private List<AccountInfo> toAccountInfos(Set<Account.Id> members)
throws PermissionBackendException { throws PermissionBackendException {
AccountLoader accountLoader = accountLoaderFactory.create(true);
List<AccountInfo> memberInfos = new ArrayList<>(members.size()); List<AccountInfo> memberInfos = new ArrayList<>(members.size());
for (Account.Id member : members) { for (Account.Id member : members) {
memberInfos.add(accountLoader.get(member)); memberInfos.add(accountLoader.get(member));

File diff suppressed because one or more lines are too long

View File

@@ -89,6 +89,7 @@
'text/x-twig': 'twig', 'text/x-twig': 'twig',
'text/x-vb': 'vb', 'text/x-vb': 'vb',
'text/x-verilog': 'v', 'text/x-verilog': 'v',
'text/x-vhdl': 'vhdl',
'text/x-yaml': 'yaml', 'text/x-yaml': 'yaml',
'text/vbscript': 'vbscript', 'text/vbscript': 'vbscript',
}; };