Merge changes Iffa8cf76,I2f6067e8,I0adb7642

* changes:
  RevertSubmission: Remove unused exception declarations
  Revert: Remove unused attributes
  CherryPick: Remove unused attributes
This commit is contained in:
David Pursehouse 2019-12-26 10:02:40 +00:00 committed by Gerrit Code Review
commit 1ac8a41f41
3 changed files with 2 additions and 10 deletions

View File

@ -39,7 +39,6 @@ import com.google.gerrit.server.project.NoSuchChangeException;
import com.google.gerrit.server.project.NoSuchProjectException; import com.google.gerrit.server.project.NoSuchProjectException;
import com.google.gerrit.server.project.ProjectCache; import com.google.gerrit.server.project.ProjectCache;
import com.google.gerrit.server.submit.IntegrationException; import com.google.gerrit.server.submit.IntegrationException;
import com.google.gerrit.server.update.BatchUpdate;
import com.google.gerrit.server.update.UpdateException; import com.google.gerrit.server.update.UpdateException;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.google.inject.Singleton; import com.google.inject.Singleton;
@ -52,7 +51,6 @@ public class CherryPick
private static final FluentLogger logger = FluentLogger.forEnclosingClass(); private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private final PermissionBackend permissionBackend; private final PermissionBackend permissionBackend;
private final BatchUpdate.Factory updateFactory;
private final CherryPickChange cherryPickChange; private final CherryPickChange cherryPickChange;
private final ChangeJson.Factory json; private final ChangeJson.Factory json;
private final ContributorAgreementsChecker contributorAgreements; private final ContributorAgreementsChecker contributorAgreements;
@ -61,13 +59,11 @@ public class CherryPick
@Inject @Inject
CherryPick( CherryPick(
PermissionBackend permissionBackend, PermissionBackend permissionBackend,
BatchUpdate.Factory updateFactory,
CherryPickChange cherryPickChange, CherryPickChange cherryPickChange,
ChangeJson.Factory json, ChangeJson.Factory json,
ContributorAgreementsChecker contributorAgreements, ContributorAgreementsChecker contributorAgreements,
ProjectCache projectCache) { ProjectCache projectCache) {
this.permissionBackend = permissionBackend; this.permissionBackend = permissionBackend;
this.updateFactory = updateFactory;
this.cherryPickChange = cherryPickChange; this.cherryPickChange = cherryPickChange;
this.json = json; this.json = json;
this.contributorAgreements = contributorAgreements; this.contributorAgreements = contributorAgreements;

View File

@ -40,7 +40,6 @@ import com.google.gerrit.server.project.ContributorAgreementsChecker;
import com.google.gerrit.server.project.NoSuchChangeException; import com.google.gerrit.server.project.NoSuchChangeException;
import com.google.gerrit.server.project.NoSuchProjectException; import com.google.gerrit.server.project.NoSuchProjectException;
import com.google.gerrit.server.project.ProjectCache; import com.google.gerrit.server.project.ProjectCache;
import com.google.gerrit.server.update.BatchUpdate;
import com.google.gerrit.server.update.UpdateException; import com.google.gerrit.server.update.UpdateException;
import com.google.gerrit.server.util.time.TimeUtil; import com.google.gerrit.server.util.time.TimeUtil;
import com.google.inject.Inject; import com.google.inject.Inject;
@ -55,7 +54,6 @@ public class Revert
private static final FluentLogger logger = FluentLogger.forEnclosingClass(); private static final FluentLogger logger = FluentLogger.forEnclosingClass();
private final PermissionBackend permissionBackend; private final PermissionBackend permissionBackend;
private final BatchUpdate.Factory updateFactory;
private final PatchSetUtil psUtil; private final PatchSetUtil psUtil;
private final ChangeJson.Factory json; private final ChangeJson.Factory json;
private final ContributorAgreementsChecker contributorAgreements; private final ContributorAgreementsChecker contributorAgreements;
@ -65,14 +63,12 @@ public class Revert
@Inject @Inject
Revert( Revert(
PermissionBackend permissionBackend, PermissionBackend permissionBackend,
BatchUpdate.Factory updateFactory,
PatchSetUtil psUtil, PatchSetUtil psUtil,
ChangeJson.Factory json, ChangeJson.Factory json,
ContributorAgreementsChecker contributorAgreements, ContributorAgreementsChecker contributorAgreements,
ProjectCache projectCache, ProjectCache projectCache,
CommitUtil commitUtil) { CommitUtil commitUtil) {
this.permissionBackend = permissionBackend; this.permissionBackend = permissionBackend;
this.updateFactory = updateFactory;
this.psUtil = psUtil; this.psUtil = psUtil;
this.json = json; this.json = json;
this.contributorAgreements = contributorAgreements; this.contributorAgreements = contributorAgreements;

View File

@ -219,8 +219,8 @@ public class RevertSubmission
private RevertSubmissionInfo revertSubmission( private RevertSubmissionInfo revertSubmission(
List<ChangeData> changeData, RevertInput revertInput) List<ChangeData> changeData, RevertInput revertInput)
throws RestApiException, IOException, UpdateException, PermissionBackendException, throws RestApiException, IOException, UpdateException, ConfigInvalidException,
NoSuchProjectException, ConfigInvalidException, StorageException { StorageException {
Multimap<BranchNameKey, ChangeData> changesPerProjectAndBranch = ArrayListMultimap.create(); Multimap<BranchNameKey, ChangeData> changesPerProjectAndBranch = ArrayListMultimap.create();
changeData.stream().forEach(c -> changesPerProjectAndBranch.put(c.change().getDest(), c)); changeData.stream().forEach(c -> changesPerProjectAndBranch.put(c.change().getDest(), c));