Remove redundant throws declarations from internal APIs
Closes gh-31176
This commit is contained in:
@@ -64,7 +64,7 @@ class BatchDataSourceScriptDatabaseInitializerTests {
|
||||
@ParameterizedTest
|
||||
@EnumSource(value = DatabaseDriver.class, mode = Mode.EXCLUDE, names = { "FIREBIRD", "GAE", "HANA", "INFORMIX",
|
||||
"JTDS", "PHOENIX", "REDSHIFT", "TERADATA", "TESTCONTAINERS", "UNKNOWN" })
|
||||
void batchSchemaCanBeLocated(DatabaseDriver driver) throws IOException, SQLException {
|
||||
void batchSchemaCanBeLocated(DatabaseDriver driver) throws SQLException {
|
||||
DefaultResourceLoader resourceLoader = new DefaultResourceLoader();
|
||||
BatchProperties properties = new BatchProperties();
|
||||
DataSource dataSource = mock(DataSource.class);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.jmx;
|
||||
|
||||
import javax.management.MalformedObjectNameException;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -38,7 +37,7 @@ class ParentAwareNamingStrategyTests {
|
||||
private ApplicationContextRunner contextRunner = new ApplicationContextRunner();
|
||||
|
||||
@Test
|
||||
void objectNameMatchesManagedResourceByDefault() throws MalformedObjectNameException {
|
||||
void objectNameMatchesManagedResourceByDefault() {
|
||||
this.contextRunner.withBean("testManagedResource", TestManagedResource.class).run((context) -> {
|
||||
ParentAwareNamingStrategy strategy = new ParentAwareNamingStrategy(new AnnotationJmxAttributeSource());
|
||||
strategy.setApplicationContext(context);
|
||||
@@ -48,7 +47,7 @@ class ParentAwareNamingStrategyTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void uniqueObjectNameAddsIdentityProperty() throws MalformedObjectNameException {
|
||||
void uniqueObjectNameAddsIdentityProperty() {
|
||||
this.contextRunner.withBean("testManagedResource", TestManagedResource.class).run((context) -> {
|
||||
ParentAwareNamingStrategy strategy = new ParentAwareNamingStrategy(new AnnotationJmxAttributeSource());
|
||||
strategy.setApplicationContext(context);
|
||||
@@ -62,7 +61,7 @@ class ParentAwareNamingStrategyTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void sameBeanInParentContextAddsContextProperty() throws MalformedObjectNameException {
|
||||
void sameBeanInParentContextAddsContextProperty() {
|
||||
this.contextRunner.withBean("testManagedResource", TestManagedResource.class).run((parent) -> this.contextRunner
|
||||
.withBean("testManagedResource", TestManagedResource.class).withParent(parent).run((context) -> {
|
||||
ParentAwareNamingStrategy strategy = new ParentAwareNamingStrategy(
|
||||
@@ -77,7 +76,7 @@ class ParentAwareNamingStrategyTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void uniqueObjectNameAndSameBeanInParentContextOnlyAddsIdentityProperty() throws MalformedObjectNameException {
|
||||
void uniqueObjectNameAndSameBeanInParentContextOnlyAddsIdentityProperty() {
|
||||
this.contextRunner.withBean("testManagedResource", TestManagedResource.class).run((parent) -> this.contextRunner
|
||||
.withBean("testManagedResource", TestManagedResource.class).withParent(parent).run((context) -> {
|
||||
ParentAwareNamingStrategy strategy = new ParentAwareNamingStrategy(
|
||||
|
||||
@@ -468,7 +468,7 @@ class LiquibaseAutoConfigurationTests {
|
||||
private String name = UUID.randomUUID().toString();
|
||||
|
||||
@Bean
|
||||
SimpleDriverDataSource dataSource() throws SQLException {
|
||||
SimpleDriverDataSource dataSource() {
|
||||
SimpleDriverDataSource dataSource = new SimpleDriverDataSource();
|
||||
dataSource.setDriverClass(CustomH2Driver.class);
|
||||
dataSource.setUrl(String.format("jdbc:h2:mem:%s;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=false", this.name));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 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.
|
||||
@@ -366,7 +366,7 @@ class ServerPropertiesTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void tomcatMaxHttpPostSizeMatchesConnectorDefault() throws Exception {
|
||||
void tomcatMaxHttpPostSizeMatchesConnectorDefault() {
|
||||
assertThat(this.properties.getTomcat().getMaxHttpFormPostSize().toBytes())
|
||||
.isEqualTo(getDefaultConnector().getMaxPostSize());
|
||||
}
|
||||
@@ -378,13 +378,13 @@ class ServerPropertiesTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void tomcatMaxHttpFormPostSizeMatchesConnectorDefault() throws Exception {
|
||||
void tomcatMaxHttpFormPostSizeMatchesConnectorDefault() {
|
||||
assertThat(this.properties.getTomcat().getMaxHttpFormPostSize().toBytes())
|
||||
.isEqualTo(getDefaultConnector().getMaxPostSize());
|
||||
}
|
||||
|
||||
@Test
|
||||
void tomcatUriEncodingMatchesConnectorDefault() throws Exception {
|
||||
void tomcatUriEncodingMatchesConnectorDefault() {
|
||||
assertThat(this.properties.getTomcat().getUriEncoding().name())
|
||||
.isEqualTo(getDefaultConnector().getURIEncoding());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user