AccountsUpdateNoteDbImpl: Annotate update methods with @CanIgnoreReturnValue
The update methods return the updated account(s). It's OK for callers to
ignore this return value.
Release-Notes: skip
Change-Id: I28488c18967caa29ecbeb999e9b2c4e5b2047d88
Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/java/com/google/gerrit/server/account/storage/notedb/AccountsUpdateNoteDbImpl.java b/java/com/google/gerrit/server/account/storage/notedb/AccountsUpdateNoteDbImpl.java
index cc8ef14..2a49852 100644
--- a/java/com/google/gerrit/server/account/storage/notedb/AccountsUpdateNoteDbImpl.java
+++ b/java/com/google/gerrit/server/account/storage/notedb/AccountsUpdateNoteDbImpl.java
@@ -27,6 +27,7 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
+import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.entities.Account;
import com.google.gerrit.exceptions.DuplicateKeyException;
@@ -333,6 +334,7 @@
}
@Override
+ @CanIgnoreReturnValue
public Optional<AccountState> update(
String message, Account.Id accountId, Consumer<AccountDelta.Builder> update)
throws IOException, ConfigInvalidException {
@@ -340,6 +342,7 @@
}
@Override
+ @CanIgnoreReturnValue
public Optional<AccountState> update(
String message, Account.Id accountId, ConfigureDeltaFromState configureDeltaFromState)
throws LockFailureException, IOException, ConfigInvalidException {
@@ -404,6 +407,7 @@
}
@Override
+ @CanIgnoreReturnValue
public ImmutableList<Optional<AccountState>> updateBatch(List<UpdateArguments> updates)
throws IOException, ConfigInvalidException {
checkArgument(