diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java index d796f6e2e7..0fecd084a2 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebFluxEndpointCorsIntegrationTests.java @@ -73,7 +73,7 @@ public class WebFluxEndpointCorsIntegrationTests { } @Test - public void settingAllowedOriginsEnablesCors() throws Exception { + public void settingAllowedOriginsEnablesCors() { TestPropertyValues .of("management.endpoints.web.cors.allowed-origins:spring.example.org") .applyTo(this.context); @@ -87,7 +87,7 @@ public class WebFluxEndpointCorsIntegrationTests { } @Test - public void maxAgeDefaultsTo30Minutes() throws Exception { + public void maxAgeDefaultsTo30Minutes() { TestPropertyValues .of("management.endpoints.web.cors.allowed-origins:spring.example.org") .applyTo(this.context); @@ -96,7 +96,7 @@ public class WebFluxEndpointCorsIntegrationTests { } @Test - public void maxAgeCanBeConfigured() throws Exception { + public void maxAgeCanBeConfigured() { TestPropertyValues .of("management.endpoints.web.cors.allowed-origins:spring.example.org", "management.endpoints.web.cors.max-age: 2400") @@ -164,7 +164,7 @@ public class WebFluxEndpointCorsIntegrationTests { } @Test - public void credentialsCanBeAllowed() throws Exception { + public void credentialsCanBeAllowed() { TestPropertyValues .of("management.endpoints.web.cors.allowed-origins:spring.example.org", "management.endpoints.web.cors.allow-credentials:true") @@ -174,7 +174,7 @@ public class WebFluxEndpointCorsIntegrationTests { } @Test - public void credentialsCanBeDisabled() throws Exception { + public void credentialsCanBeDisabled() { TestPropertyValues .of("management.endpoints.web.cors.allowed-origins:spring.example.org", "management.endpoints.web.cors.allow-credentials:false") diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationReactiveIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationReactiveIntegrationTests.java index 969fc4ecdf..c390fae7b7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationReactiveIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationReactiveIntegrationTests.java @@ -62,7 +62,7 @@ public class FreeMarkerAutoConfigurationReactiveIntegrationTests { } @Test - public void defaultViewResolution() throws Exception { + public void defaultViewResolution() { registerAndRefreshContext(); MockServerWebExchange exchange = render("home"); String result = exchange.getResponse().getBodyAsString().block(); @@ -72,7 +72,7 @@ public class FreeMarkerAutoConfigurationReactiveIntegrationTests { } @Test - public void customPrefix() throws Exception { + public void customPrefix() { registerAndRefreshContext("spring.freemarker.prefix:prefix/"); MockServerWebExchange exchange = render("prefixed"); String result = exchange.getResponse().getBodyAsString().block(); @@ -80,7 +80,7 @@ public class FreeMarkerAutoConfigurationReactiveIntegrationTests { } @Test - public void customSuffix() throws Exception { + public void customSuffix() { registerAndRefreshContext("spring.freemarker.suffix:.freemarker"); MockServerWebExchange exchange = render("suffixed"); String result = exchange.getResponse().getBodyAsString().block(); @@ -88,7 +88,7 @@ public class FreeMarkerAutoConfigurationReactiveIntegrationTests { } @Test - public void customTemplateLoaderPath() throws Exception { + public void customTemplateLoaderPath() { registerAndRefreshContext( "spring.freemarker.templateLoaderPath:classpath:/custom-templates/"); MockServerWebExchange exchange = render("custom"); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java index 0299e944ba..6e4b32627d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java @@ -514,7 +514,7 @@ public class JacksonAutoConfigurationTests { @Override public void serialize(Foo value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { + throws IOException { jgen.writeStartObject(); jgen.writeStringField("foo", "bar"); jgen.writeEndObject(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJsonSerializationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJsonSerializationTests.java index 10b1a91f31..add990a9d9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJsonSerializationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJsonSerializationTests.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.BeanDescription; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.ObjectMapper; @@ -85,7 +84,7 @@ public class DataSourceJsonSerializationTests { @Override public void serialize(DataSource value, JsonGenerator jgen, - SerializerProvider provider) throws IOException, JsonProcessingException { + SerializerProvider provider) throws IOException { jgen.writeStartObject(); for (PropertyDescriptor property : BeanUtils .getPropertyDescriptors(DataSource.class)) { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfigurationTests.java index 84b8f4a964..45c43cb1d8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/AuthenticationManagerConfigurationTests.java @@ -40,8 +40,7 @@ public class AuthenticationManagerConfigurationTests { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner(); @Test - public void userDetailsServiceWhenPasswordEncoderAbsentAndDefaultPassword() - throws Exception { + public void userDetailsServiceWhenPasswordEncoderAbsentAndDefaultPassword() { this.contextRunner.withUserConfiguration(TestSecurityConfiguration.class, AuthenticationManagerConfiguration.class).run((context -> { InMemoryUserDetailsManager userDetailsService = context @@ -53,20 +52,18 @@ public class AuthenticationManagerConfigurationTests { } @Test - public void userDetailsServiceWhenPasswordEncoderAbsentAndRawPassword() - throws Exception { + public void userDetailsServiceWhenPasswordEncoderAbsentAndRawPassword() { testPasswordEncoding(TestSecurityConfiguration.class, "secret", "{noop}secret"); } @Test - public void userDetailsServiceWhenPasswordEncoderAbsentAndEncodedPassword() - throws Exception { + public void userDetailsServiceWhenPasswordEncoderAbsentAndEncodedPassword() { String password = "{bcrypt}$2a$10$sCBi9fy9814vUPf2ZRbtp.fR5/VgRk2iBFZ.ypu5IyZ28bZgxrVDa"; testPasswordEncoding(TestSecurityConfiguration.class, password, password); } @Test - public void userDetailsServiceWhenPasswordEncoderBeanPresent() throws Exception { + public void userDetailsServiceWhenPasswordEncoderBeanPresent() { testPasswordEncoding(TestConfigWithPasswordEncoder.class, "secret", "secret"); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/ReactiveAuthenticationManagerConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/ReactiveAuthenticationManagerConfigurationTests.java index e02bccafc8..4f07a8b2ac 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/ReactiveAuthenticationManagerConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/ReactiveAuthenticationManagerConfigurationTests.java @@ -41,8 +41,7 @@ public class ReactiveAuthenticationManagerConfigurationTests { private final ReactiveWebApplicationContextRunner contextRunner = new ReactiveWebApplicationContextRunner(); @Test - public void userDetailsServiceWhenPasswordEncoderAbsentAndDefaultPassword() - throws Exception { + public void userDetailsServiceWhenPasswordEncoderAbsentAndDefaultPassword() { this.contextRunner .withUserConfiguration(TestSecurityConfiguration.class, ReactiveAuthenticationManagerConfiguration.class) @@ -56,20 +55,18 @@ public class ReactiveAuthenticationManagerConfigurationTests { } @Test - public void userDetailsServiceWhenPasswordEncoderAbsentAndRawPassword() - throws Exception { + public void userDetailsServiceWhenPasswordEncoderAbsentAndRawPassword() { testPasswordEncoding(TestSecurityConfiguration.class, "secret", "{noop}secret"); } @Test - public void userDetailsServiceWhenPasswordEncoderAbsentAndEncodedPassword() - throws Exception { + public void userDetailsServiceWhenPasswordEncoderAbsentAndEncodedPassword() { String password = "{bcrypt}$2a$10$sCBi9fy9814vUPf2ZRbtp.fR5/VgRk2iBFZ.ypu5IyZ28bZgxrVDa"; testPasswordEncoding(TestSecurityConfiguration.class, password, password); } @Test - public void userDetailsServiceWhenPasswordEncoderBeanPresent() throws Exception { + public void userDetailsServiceWhenPasswordEncoderBeanPresent() { testPasswordEncoding(TestConfigWithPasswordEncoder.class, "secret", "secret"); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorAttributesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorAttributesTests.java index 2f37dcf922..1e4ec1661a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorAttributesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorAttributesTests.java @@ -176,7 +176,7 @@ public class DefaultErrorAttributesTests { return ServerRequest.create(exchange, this.readers); } - public int method(String firstParam) { + public int method() { return 42; } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java index 693cb145ce..0f5a6d9e81 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java @@ -17,7 +17,6 @@ package org.springframework.boot.devtools.filewatch; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.time.Duration; @@ -297,7 +296,7 @@ public class FileSystemWatcherTests { return this.changes.get(0); } - private File touch(File file) throws FileNotFoundException, IOException { + private File touch(File file) throws IOException { file.getParentFile().mkdirs(); FileOutputStream fileOutputStream = new FileOutputStream(file); fileOutputStream.close(); diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledFalseIntegrationTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledFalseIntegrationTest.java index c191faacde..93f082521e 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledFalseIntegrationTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledFalseIntegrationTest.java @@ -51,7 +51,7 @@ public class OverrideAutoConfigurationEnabledFalseIntegrationTest { private ApplicationContext context; @Test - public void disabledAutoConfiguration() throws Exception { + public void disabledAutoConfiguration() { ApplicationContext context = this.context; assertThat(context.getBean(ExampleTestConfig.class)).isNotNull(); this.thrown.expect(NoSuchBeanDefinitionException.class); diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledTrueIntegrationTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledTrueIntegrationTest.java index a6eb176bdb..455d1d443d 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledTrueIntegrationTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/OverrideAutoConfigurationEnabledTrueIntegrationTest.java @@ -45,7 +45,7 @@ public class OverrideAutoConfigurationEnabledTrueIntegrationTest { private ApplicationContext context; @Test - public void autoConfiguredContext() throws Exception { + public void autoConfiguredContext() { ApplicationContext context = this.context; assertThat(context.getBean(ExampleSpringBootApplication.class)).isNotNull(); assertThat(context.getBean(ConfigurationPropertiesBindingPostProcessor.class)) diff --git a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClientTests.java b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClientTests.java index e93403d627..5886e3a792 100644 --- a/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClientTests.java +++ b/spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/htmlunit/LocalHostWebClientTests.java @@ -17,7 +17,6 @@ package org.springframework.boot.test.web.htmlunit; import java.io.IOException; -import java.net.MalformedURLException; import java.net.URL; import com.gargoylesoftware.htmlunit.StringWebResponse; @@ -91,10 +90,10 @@ public class LocalHostWebClientTests { .isEqualTo(new URL("http://localhost:8181/test")); } - private WebConnection mockConnection() throws MalformedURLException, IOException { + private WebConnection mockConnection() throws IOException { WebConnection connection = mock(WebConnection.class); WebResponse response = new StringWebResponse("test", new URL("http://localhost")); - given(connection.getResponse((WebRequest) any())).willReturn(response); + given(connection.getResponse(any())).willReturn(response); return connection; } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/TestProject.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/TestProject.java index 00f857e810..db5c766b8d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/TestProject.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/TestProject.java @@ -17,14 +17,12 @@ package org.springframework.boot.configurationprocessor; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringReader; -import java.io.UnsupportedEncodingException; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedHashSet; @@ -194,7 +192,7 @@ public class TestProject { } private static void putContents(File targetFile, String contents) - throws FileNotFoundException, IOException, UnsupportedEncodingException { + throws IOException { FileCopyUtils.copy(new StringReader(contents), new FileWriter(targetFile)); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/TestJarFile.java b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/TestJarFile.java index 728e777c83..d0f2aad330 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/TestJarFile.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/TestJarFile.java @@ -18,7 +18,6 @@ package org.springframework.boot.loader.tools; import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; @@ -88,7 +87,7 @@ public class TestJarFile { } private void copyToFile(InputStream inputStream, File file) - throws FileNotFoundException, IOException { + throws IOException { try (OutputStream outputStream = new FileOutputStream(file)) { copy(inputStream, outputStream); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java index 217c5f0909..1646d4b0a4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/TestJarCreator.java @@ -55,7 +55,7 @@ public abstract class TestJarCreator { } private static void writeNestedEntry(String name, boolean unpackNested, - JarOutputStream jarOutputStream) throws Exception, IOException { + JarOutputStream jarOutputStream) throws Exception { JarEntry nestedEntry = new JarEntry(name); byte[] nestedJarData = getNestedJarData(); nestedEntry.setSize(nestedJarData.length); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoaderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoaderTests.java index ed43994b13..3c335a327e 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoaderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoaderTests.java @@ -17,7 +17,6 @@ package org.springframework.boot.web.embedded.tomcat; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.net.URL; @@ -92,7 +91,7 @@ public class TomcatEmbeddedWebappClassLoaderTests { return "jar:file:" + war.getAbsolutePath() + "!/WEB-INF/classes/"; } - private File createWar() throws IOException, FileNotFoundException { + private File createWar() throws IOException { File warFile = this.temp.newFile("test.war"); try (JarOutputStream warOut = new JarOutputStream( new FileOutputStream(warFile))) { diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java index 1753c6e161..fdb83291f8 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java @@ -17,7 +17,6 @@ package org.springframework.boot.context.embedded; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.FileWriter; @@ -71,7 +70,7 @@ class ApplicationBuilder { } private File doBuildApplication(File containerFolder) - throws IOException, FileNotFoundException, MavenInvocationException { + throws IOException, MavenInvocationException { File resourcesJar = createResourcesJar(); File appFolder = new File(containerFolder, "app"); appFolder.mkdirs(); @@ -81,7 +80,7 @@ class ApplicationBuilder { return new File(appFolder, "target/app-0.0.1." + this.packaging); } - private File createResourcesJar() throws IOException, FileNotFoundException { + private File createResourcesJar() throws IOException { File resourcesJar = new File(this.temp.getRoot(), "resources.jar"); if (resourcesJar.exists()) { return resourcesJar; @@ -99,7 +98,7 @@ class ApplicationBuilder { } private void writePom(File appFolder, File resourcesJar) - throws FileNotFoundException, IOException { + throws IOException { Map context = new HashMap<>(); context.put("packaging", this.packaging); context.put("container", this.container); diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarDevelopmentIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarDevelopmentIntegrationTests.java index 7db700c7f5..e4a4249d25 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarDevelopmentIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarDevelopmentIntegrationTests.java @@ -50,15 +50,14 @@ public class EmbeddedServletContainerJarDevelopmentIntegrationTests } @Test - public void metaInfResourceFromDependencyIsAvailableViaHttp() throws Exception { + public void metaInfResourceFromDependencyIsAvailableViaHttp() { ResponseEntity entity = this.rest .getForEntity("/nested-meta-inf-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } @Test - public void metaInfResourceFromDependencyIsAvailableViaServletContext() - throws Exception { + public void metaInfResourceFromDependencyIsAvailableViaServletContext() { ResponseEntity entity = this.rest.getForEntity( "/servletContext?/nested-meta-inf-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarPackagingIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarPackagingIntegrationTests.java index 07cfd5652b..affcf04587 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarPackagingIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarPackagingIntegrationTests.java @@ -51,28 +51,28 @@ public class EmbeddedServletContainerJarPackagingIntegrationTests } @Test - public void nestedMetaInfResourceIsAvailableViaHttp() throws Exception { + public void nestedMetaInfResourceIsAvailableViaHttp() { ResponseEntity entity = this.rest .getForEntity("/nested-meta-inf-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } @Test - public void nestedMetaInfResourceIsAvailableViaServletContext() throws Exception { + public void nestedMetaInfResourceIsAvailableViaServletContext() { ResponseEntity entity = this.rest.getForEntity( "/servletContext?/nested-meta-inf-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } @Test - public void nestedJarIsNotAvailableViaHttp() throws Exception { + public void nestedJarIsNotAvailableViaHttp() { ResponseEntity entity = this.rest .getForEntity("/BOOT-INF/lib/resources-1.0.jar", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); } @Test - public void applicationClassesAreNotAvailableViaHttp() throws Exception { + public void applicationClassesAreNotAvailableViaHttp() { ResponseEntity entity = this.rest.getForEntity( "/BOOT-INF/classes/com/example/ResourceHandlingApplication.class", String.class); @@ -80,7 +80,7 @@ public class EmbeddedServletContainerJarPackagingIntegrationTests } @Test - public void launcherIsNotAvailableViaHttp() throws Exception { + public void launcherIsNotAvailableViaHttp() { ResponseEntity entity = this.rest.getForEntity( "/org/springframework/boot/loader/Launcher.class", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarDevelopmentIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarDevelopmentIntegrationTests.java index d0d67f42a2..e3b3c6dc66 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarDevelopmentIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarDevelopmentIntegrationTests.java @@ -50,22 +50,21 @@ public class EmbeddedServletContainerWarDevelopmentIntegrationTests } @Test - public void metaInfResourceFromDependencyIsAvailableViaHttp() throws Exception { + public void metaInfResourceFromDependencyIsAvailableViaHttp() { ResponseEntity entity = this.rest .getForEntity("/nested-meta-inf-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } @Test - public void metaInfResourceFromDependencyIsAvailableViaServletContext() - throws Exception { + public void metaInfResourceFromDependencyIsAvailableViaServletContext() { ResponseEntity entity = this.rest.getForEntity( "/servletContext?/nested-meta-inf-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } @Test - public void webappResourcesAreAvailableViaHttp() throws Exception { + public void webappResourcesAreAvailableViaHttp() { ResponseEntity entity = this.rest.getForEntity("/webapp-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarPackagingIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarPackagingIntegrationTests.java index 78c4dd0e3e..b339a6e346 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarPackagingIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarPackagingIntegrationTests.java @@ -51,28 +51,28 @@ public class EmbeddedServletContainerWarPackagingIntegrationTests } @Test - public void nestedMetaInfResourceIsAvailableViaHttp() throws Exception { + public void nestedMetaInfResourceIsAvailableViaHttp() { ResponseEntity entity = this.rest .getForEntity("/nested-meta-inf-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } @Test - public void nestedMetaInfResourceIsAvailableViaServletContext() throws Exception { + public void nestedMetaInfResourceIsAvailableViaServletContext() { ResponseEntity entity = this.rest.getForEntity( "/servletContext?/nested-meta-inf-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } @Test - public void nestedJarIsNotAvailableViaHttp() throws Exception { + public void nestedJarIsNotAvailableViaHttp() { ResponseEntity entity = this.rest .getForEntity("/WEB-INF/lib/resources-1.0.jar", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); } @Test - public void applicationClassesAreNotAvailableViaHttp() throws Exception { + public void applicationClassesAreNotAvailableViaHttp() { ResponseEntity entity = this.rest.getForEntity( "/WEB-INF/classes/com/example/ResourceHandlingApplication.class", String.class); @@ -80,14 +80,14 @@ public class EmbeddedServletContainerWarPackagingIntegrationTests } @Test - public void webappResourcesAreAvailableViaHttp() throws Exception { + public void webappResourcesAreAvailableViaHttp() { ResponseEntity entity = this.rest.getForEntity("/webapp-resource.txt", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); } @Test - public void loaderClassesAreNotAvailableViaHttp() throws Exception { + public void loaderClassesAreNotAvailableViaHttp() { ResponseEntity entity = this.rest.getForEntity( "/org/springframework/boot/loader/Launcher.class", String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);