From 2d16df1a07d72d32bb7981fc521ad8fe0b8791c6 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 20 Sep 2023 22:18:01 +0200 Subject: [PATCH] [errorprone] TagCommand: Remove unused parameter of private method See https://errorprone.info/bugpattern/UnusedVariable Change-Id: I7e8aae3494ce60dbeb474f6bead0817c36276e69 --- .../src/org/eclipse/jgit/api/TagCommand.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java index dd4ba1038..3edaf5e74 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java @@ -33,7 +33,6 @@ import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.lib.RefUpdate.Result; import org.eclipse.jgit.lib.Repository; -import org.eclipse.jgit.lib.RepositoryState; import org.eclipse.jgit.lib.TagBuilder; import org.eclipse.jgit.revwalk.RevObject; import org.eclipse.jgit.revwalk.RevWalk; @@ -108,9 +107,7 @@ protected TagCommand(Repository repo) { public Ref call() throws GitAPIException, ConcurrentRefUpdateException, InvalidTagNameException, NoHeadException { checkCallable(); - - RepositoryState state = repo.getRepositoryState(); - processOptions(state); + processOptions(); try (RevWalk revWalk = new RevWalk(repo)) { // if no id is set, we should attempt to use HEAD @@ -197,9 +194,6 @@ private Ref updateTagRef(ObjectId tagId, RevWalk revWalk, * Sets default values for not explicitly specified options. Then validates * that all required data has been provided. * - * @param state - * the state of the repository we are working on - * * @throws InvalidTagNameException * if the tag name is null or invalid * @throws ServiceUnavailableException @@ -208,7 +202,7 @@ private Ref updateTagRef(ObjectId tagId, RevWalk revWalk, * if the tag should be signed but {@code gpg.format} is not * {@link GpgFormat#OPENPGP} */ - private void processOptions(RepositoryState state) + private void processOptions() throws InvalidTagNameException, ServiceUnavailableException, UnsupportedSigningFormatException { if (name == null