Refactor array usage to list for RepositoryConfig and GroupSetProvider
Have getOwnerGroups return a list of strings rather than an array in RepositoryConfig. Replace string array usage with a list for the GroupSetProvider constructor, to simplify the life of its caller(s) now using the aforementioned list-returning getOwnerGroups. Update the impacted RepositoryConfigTest tests accordingly. That includes a minor refactoring in testAllBasePath, for consistency purposes. Change-Id: I540dae480a37c3bbb144fef48a95ba4ff29a019f
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
package com.google.gerrit.server.config;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.gerrit.server.account.GroupBackend;
|
||||
import com.google.gerrit.server.group.SystemGroupBackend;
|
||||
import com.google.gerrit.server.util.ServerRequestContext;
|
||||
@@ -30,8 +31,8 @@ public class GitReceivePackGroupsProvider extends GroupSetProvider {
|
||||
@GerritServerConfig Config config,
|
||||
ThreadLocalRequestContext threadContext,
|
||||
ServerRequestContext serverCtx) {
|
||||
super(gb, threadContext, serverCtx, config.getStringList("receive", null,
|
||||
"allowGroup"));
|
||||
super(gb, threadContext, serverCtx, ImmutableList.copyOf(
|
||||
config.getStringList("receive", null, "allowGroup")));
|
||||
|
||||
// If no group was set, default to "registered users"
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user