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:
David Pursehouse
2016-06-17 15:07:35 +09:00
parent 112ccb7698
commit 5bb8b15700

View File

@@ -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());
}
}