SubmitStrategyListener: Remove unnecessary intermediate variable
The account variable is only used once, on the following line, and can be inlined. Change-Id: I848e12874c28d4ed502038d6ea61a5af621ab27d
This commit is contained in:
@@ -18,7 +18,6 @@ import com.google.common.base.CharMatcher;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.gerrit.extensions.api.changes.SubmitInput;
|
||||
import com.google.gerrit.extensions.restapi.ResourceConflictException;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.server.change.Submit.TestSubmitInput;
|
||||
import com.google.gerrit.server.git.BatchUpdate;
|
||||
@@ -70,12 +69,10 @@ public class SubmitStrategyListener extends BatchUpdate.Listener {
|
||||
if (args.mergeTip.getCurrentTip().equals(args.mergeTip.getInitialTip())) {
|
||||
continue;
|
||||
}
|
||||
Account account =
|
||||
args.accountCache.get(args.caller.getAccountId()).getAccount();
|
||||
args.hooks.doRefUpdatedHook(args.destBranch,
|
||||
args.mergeTip.getInitialTip(),
|
||||
args.mergeTip.getCurrentTip(),
|
||||
account);
|
||||
args.accountCache.get(args.caller.getAccountId()).getAccount());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user