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

@@ -135,7 +135,7 @@ class SpringBootContextLoaderTests {
}
@Test
void propertySourceOrdering() throws Exception {
void propertySourceOrdering() {
TestContext context = new ExposedTestContextManager(PropertySourceOrdering.class).getExposedTestContext();
ConfigurableEnvironment environment = (ConfigurableEnvironment) context.getApplicationContext()
.getEnvironment();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ class MockBeanWithDirtiesContextClassModeBeforeMethodIntegrationTests {
private ExampleServiceCaller caller;
@Test
void testMocking() throws Exception {
void testMocking() {
given(this.exampleService.greeting()).willReturn("Boot");
assertThat(this.caller.sayGreeting()).isEqualTo("I say Boot");
}

View File

@@ -53,7 +53,7 @@ class SpyBeanOnTestFieldForExistingBeanWithQualifierIntegrationTests {
private ApplicationContext applicationContext;
@Test
void testMocking() throws Exception {
void testMocking() {
this.caller.sayGreeting();
then(this.service).should().greeting();
}

View File

@@ -47,7 +47,7 @@ class SpyBeanWithDirtiesContextClassModeBeforeMethodIntegrationTests {
private ExampleServiceCaller caller;
@Test
void testSpying() throws Exception {
void testSpying() {
this.caller.sayGreeting();
then(this.exampleService).should().greeting();
}

View File

@@ -47,7 +47,7 @@ class SpyBeanWithJdkProxyTests {
private ExampleRepository repository;
@Test
void jdkProxyCanBeSpied() throws Exception {
void jdkProxyCanBeSpied() {
Example example = this.service.find("id");
assertThat(example.id).isEqualTo("id");
then(this.repository).should().find("id");