From 1f72443dffadc0afbd7c9033c1916a69e6b57150 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 14 Nov 2017 17:08:51 +0100 Subject: [PATCH] Add @Nullable annotations for some Accounts methods Change-Id: Idf1a0026e9f8ad0efbf90517689a25ca28b91f68 --- java/com/google/gerrit/server/account/Accounts.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/com/google/gerrit/server/account/Accounts.java b/java/com/google/gerrit/server/account/Accounts.java index a9428f049c..8d39fb18fd 100644 --- a/java/com/google/gerrit/server/account/Accounts.java +++ b/java/com/google/gerrit/server/account/Accounts.java @@ -18,6 +18,7 @@ import static java.util.Comparator.comparing; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toSet; +import com.google.gerrit.common.Nullable; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.RefNames; import com.google.gerrit.server.config.AllUsersName; @@ -56,6 +57,7 @@ public class Accounts { this.emailValidator = emailValidator; } + @Nullable public Account get(Account.Id accountId) throws IOException, ConfigInvalidException { try (Repository repo = repoManager.openRepository(allUsersName)) { return read(repo, accountId); @@ -133,6 +135,7 @@ public class Accounts { } } + @Nullable private Account read(Repository allUsersRepository, Account.Id accountId) throws IOException, ConfigInvalidException { AccountConfig accountConfig = new AccountConfig(emailValidator, accountId);