Remove declarations of unthrown exceptions

Change-Id: Ia11fe13888f434c3e78384f19c2a59536d753342
This commit is contained in:
David Pursehouse
2019-05-20 10:51:25 +09:00
parent 91970964cf
commit e34298de09
2 changed files with 5 additions and 10 deletions

View File

@@ -162,7 +162,6 @@ import java.util.Optional;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.errors.RepositoryNotFoundException;
import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository; import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.Config;
@@ -991,8 +990,7 @@ public abstract class AbstractDaemonTest {
.update(); .update();
} }
protected void grant(Project.NameKey project, String ref, String permission) protected void grant(Project.NameKey project, String ref, String permission) {
throws RepositoryNotFoundException, IOException, ConfigInvalidException {
projectOperations projectOperations
.project(project) .project(project)
.forUpdate() .forUpdate()
@@ -1000,8 +998,7 @@ public abstract class AbstractDaemonTest {
.update(); .update();
} }
protected void grant(Project.NameKey project, String ref, String permission, boolean force) protected void grant(Project.NameKey project, String ref, String permission, boolean force) {
throws RepositoryNotFoundException, IOException, ConfigInvalidException {
projectOperations projectOperations
.project(project) .project(project)
.forUpdate() .forUpdate()
@@ -1014,8 +1011,7 @@ public abstract class AbstractDaemonTest {
String ref, String ref,
String permission, String permission,
boolean force, boolean force,
AccountGroup.UUID groupUUID) AccountGroup.UUID groupUUID) {
throws RepositoryNotFoundException, IOException, ConfigInvalidException {
projectOperations projectOperations
.project(project) .project(project)
.forUpdate() .forUpdate()
@@ -1030,8 +1026,7 @@ public abstract class AbstractDaemonTest {
Project.NameKey project, Project.NameKey project,
String ref, String ref,
AccountGroup.UUID groupUUID, AccountGroup.UUID groupUUID,
boolean exclusive) boolean exclusive) {
throws RepositoryNotFoundException, IOException, ConfigInvalidException {
projectOperations projectOperations
.project(project) .project(project)
.forUpdate() .forUpdate()

View File

@@ -985,7 +985,7 @@ public class ExternalIdIT extends AbstractDaemonTest {
return info; return info;
} }
private void allowPushOfExternalIds() throws IOException, ConfigInvalidException { private void allowPushOfExternalIds() {
grant(allUsers, RefNames.REFS_EXTERNAL_IDS, Permission.READ); grant(allUsers, RefNames.REFS_EXTERNAL_IDS, Permission.READ);
grant(allUsers, RefNames.REFS_EXTERNAL_IDS, Permission.PUSH); grant(allUsers, RefNames.REFS_EXTERNAL_IDS, Permission.PUSH);
} }