Use native constructors instead of Guava to instantiate empty collections

It's not necessary to use Guava's helper methods when instantiating
empty collections. Just use the native constructors.

Change-Id: I7f454909b15924ee49e149edf9f053da9f718502
This commit is contained in:
David Pursehouse
2016-05-03 23:16:15 +09:00
parent b621cb9eb7
commit ccdeae8e64
135 changed files with 394 additions and 383 deletions

View File

@@ -16,11 +16,11 @@ package com.google.gerrit.server.auth;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.Lists;
import com.google.gerrit.extensions.registration.DynamicSet;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import java.util.ArrayList;
import java.util.List;
/**
@@ -38,8 +38,8 @@ public final class UniversalAuthBackend implements AuthBackend {
@Override
public AuthUser authenticate(final AuthRequest request) throws AuthException {
List<AuthUser> authUsers = Lists.newArrayList();
List<AuthException> authExs = Lists.newArrayList();
List<AuthUser> authUsers = new ArrayList<>();
List<AuthException> authExs = new ArrayList<>();
for (AuthBackend backend : authBackends) {
try {
authUsers.add(checkNotNull(backend.authenticate(request)));