Remove redundant throws declarations from internal APIs

Closes gh-31176
This commit is contained in:
Andy Wilkinson
2022-05-26 14:24:55 +01:00
parent cbf42dea14
commit ee45fd2fc8
69 changed files with 157 additions and 193 deletions

View File

@@ -112,16 +112,11 @@ abstract class AbstractBootArchiveTests<T extends Jar & BootArchive> {
@BeforeEach
void createTask() {
try {
File projectDir = new File(this.temp, "project");
projectDir.mkdirs();
this.project = GradleProjectBuilder.builder().withProjectDir(projectDir).build();
this.project.setDescription("Test project for " + this.taskClass.getSimpleName());
this.task = configure(this.project.getTasks().create("testArchive", this.taskClass));
}
catch (IOException ex) {
throw new RuntimeException(ex);
}
File projectDir = new File(this.temp, "project");
projectDir.mkdirs();
this.project = GradleProjectBuilder.builder().withProjectDir(projectDir).build();
this.project.setDescription("Test project for " + this.taskClass.getSimpleName());
this.task = configure(this.project.getTasks().create("testArchive", this.taskClass));
}
@Test
@@ -586,7 +581,7 @@ abstract class AbstractBootArchiveTests<T extends Jar & BootArchive> {
return file;
}
private T configure(T task) throws IOException {
private T configure(T task) {
AbstractArchiveTask archiveTask = task;
archiveTask.getArchiveBaseName().set("test");
File destination = new File(this.temp, "destination");