Skip to content

Commit 99edda7

Browse files
committed
Polish
1 parent b014039 commit 99edda7

File tree

42 files changed

+125
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+125
-149
lines changed

Diff for: buildSrc/src/main/java/org/springframework/boot/build/context/properties/ConfigurationPropertiesPlugin.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.gradle.api.artifacts.Configuration;
2626
import org.gradle.api.file.RegularFile;
2727
import org.gradle.api.plugins.JavaPlugin;
28-
import org.gradle.api.plugins.JavaPluginConvention;
2928
import org.gradle.api.plugins.JavaPluginExtension;
3029
import org.gradle.api.provider.Provider;
3130
import org.gradle.api.tasks.PathSensitivity;
@@ -145,7 +144,7 @@ private void registerCheckMetadataTask(Project project) {
145144
TaskProvider<CheckSpringConfigurationMetadata> checkConfigurationMetadata = project.getTasks()
146145
.register(CHECK_SPRING_CONFIGURATION_METADATA_TASK_NAME, CheckSpringConfigurationMetadata.class);
147146
checkConfigurationMetadata.configure((check) -> {
148-
SourceSet mainSourceSet = project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets()
147+
SourceSet mainSourceSet = project.getExtensions().getByType(JavaPluginExtension.class).getSourceSets()
149148
.getByName(SourceSet.MAIN_SOURCE_SET_NAME);
150149
Provider<RegularFile> metadataLocation = project.getTasks()
151150
.named(mainSourceSet.getCompileJavaTaskName(), JavaCompile.class)

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/observation/web/reactive/ServerRequestObservationConventionAdapter.java

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* @author Brian Clozel
3535
*/
3636
@SuppressWarnings("removal")
37+
@Deprecated(since = "3.0.0", forRemoval = true)
3738
class ServerRequestObservationConventionAdapter implements ServerRequestObservationConvention {
3839

3940
private final String name;

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/observation/web/servlet/ServerRequestObservationConventionAdapter.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
*
3737
* @author Brian Clozel
3838
*/
39-
@SuppressWarnings({ "deprecation", "removal" })
39+
@SuppressWarnings("removal")
40+
@Deprecated(since = "3.0.0", forRemoval = true)
4041
class ServerRequestObservationConventionAdapter implements ServerRequestObservationConvention {
4142

4243
private final String observationName;

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/context/properties/ConfigurationPropertiesReportEndpointAutoConfigurationTests.java

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ void rolesCanBeConfiguredViaTheEnvironment() {
7777
}
7878

7979
@Test
80-
@SuppressWarnings("unchecked")
8180
void showValuesCanBeConfiguredViaTheEnvironment() {
8281
this.contextRunner.withUserConfiguration(Config.class)
8382
.withPropertyValues("management.endpoint.configprops.show-values: WHEN_AUTHORIZED")

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/env/EnvironmentEndpointAutoConfigurationTests.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ void rolesCanBeConfiguredViaTheEnvironment() {
9797
}
9898

9999
@Test
100-
@SuppressWarnings("unchecked")
101100
void showValuesCanBeConfiguredViaTheEnvironment() {
102101
this.contextRunner.withPropertyValues("management.endpoint.env.show-values: WHEN_AUTHORIZED")
103102
.withPropertyValues("management.endpoints.web.exposure.include=env")
@@ -107,10 +106,8 @@ void showValuesCanBeConfiguredViaTheEnvironment() {
107106
EnvironmentEndpointWebExtension webExtension = context
108107
.getBean(EnvironmentEndpointWebExtension.class);
109108
EnvironmentEndpoint endpoint = context.getBean(EnvironmentEndpoint.class);
110-
Show showValuesWebExtension = (Show) ReflectionTestUtils.getField(webExtension, "showValues");
111-
assertThat(showValuesWebExtension).isEqualTo(Show.WHEN_AUTHORIZED);
112-
Show showValues = (Show) ReflectionTestUtils.getField(endpoint, "showValues");
113-
assertThat(showValues).isEqualTo(Show.WHEN_AUTHORIZED);
109+
assertThat(webExtension).extracting("showValues").isEqualTo(Show.WHEN_AUTHORIZED);
110+
assertThat(endpoint).extracting("showValues").isEqualTo(Show.WHEN_AUTHORIZED);
114111
});
115112
}
116113

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/client/RestTemplateObservationConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* @author Brian Clozel
5555
*/
5656
@ExtendWith(OutputCaptureExtension.class)
57-
@SuppressWarnings({ "deprecation", "removal" })
57+
@SuppressWarnings("removal")
5858
class RestTemplateObservationConfigurationTests {
5959

6060
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/client/WebClientObservationConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* @author Stephane Nicoll
5656
*/
5757
@ExtendWith(OutputCaptureExtension.class)
58-
@SuppressWarnings({ "deprecation", "removal" })
58+
@SuppressWarnings("removal")
5959
class WebClientObservationConfigurationTests {
6060

6161
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple())

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/reactive/ServerRequestObservationConventionAdapterTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* @author Brian Clozel
3535
*/
3636
@SuppressWarnings("removal")
37+
@Deprecated(since = "3.0.0", forRemoval = true)
3738
class ServerRequestObservationConventionAdapterTests {
3839

3940
private static final String TEST_METRIC_NAME = "test.metric.name";

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/reactive/WebFluxObservationAutoConfigurationTests.java

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ void shouldUseConventionAdapterWhenCustomTagsContributor() {
7676
});
7777
}
7878

79+
@Deprecated(since = "3.0.0", forRemoval = true)
7980
@Configuration(proxyBeanMethods = false)
8081
static class CustomTagsProviderConfiguration {
8182

@@ -96,6 +97,7 @@ WebFluxTagsContributor tagsContributor() {
9697

9798
}
9899

100+
@Deprecated(since = "3.0.0", forRemoval = true)
99101
static class CustomTagsContributor implements WebFluxTagsContributor {
100102

101103
@Override

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/servlet/ServerRequestObservationConventionAdapterTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* @author Brian Clozel
4242
*/
4343
@SuppressWarnings("removal")
44+
@Deprecated(since = "3.0.0", forRemoval = true)
4445
class ServerRequestObservationConventionAdapterTests {
4546

4647
private static final String TEST_METRIC_NAME = "test.metric.name";

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/observation/web/servlet/WebMvcObservationAutoConfigurationTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ WebMvcTagsContributor tagContributorTwo() {
210210

211211
}
212212

213+
@Deprecated(since = "3.0.0", forRemoval = true)
213214
private static final class TestWebMvcTagsProvider implements WebMvcTagsProvider {
214215

215216
@Override

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/quartz/QuartzEndpointAutoConfigurationTests.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,14 @@ void rolesCanBeConfiguredViaTheEnvironment() {
101101
}
102102

103103
@Test
104-
@SuppressWarnings("unchecked")
105104
void showValuesCanBeConfiguredViaTheEnvironment() {
106105
this.contextRunner.withBean(Scheduler.class, () -> mock(Scheduler.class))
107106
.withPropertyValues("management.endpoint.quartz.show-values: WHEN_AUTHORIZED")
108107
.withPropertyValues("management.endpoints.web.exposure.include=quartz")
109108
.withSystemProperties("dbPassword=123456", "apiKey=123456").run((context) -> {
110109
assertThat(context).hasSingleBean(QuartzEndpointWebExtension.class);
111-
QuartzEndpointWebExtension webExtension = context.getBean(QuartzEndpointWebExtension.class);
112-
Show showValuesWebExtension = (Show) ReflectionTestUtils.getField(webExtension, "showValues");
113-
assertThat(showValuesWebExtension).isEqualTo(Show.WHEN_AUTHORIZED);
110+
assertThat(context.getBean(QuartzEndpointWebExtension.class)).extracting("showValues")
111+
.isEqualTo(Show.WHEN_AUTHORIZED);
114112
});
115113
}
116114

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyEndpointResourceFactory.java

+7-12
Original file line numberDiff line numberDiff line change
@@ -239,21 +239,16 @@ private Response convertToJaxRsResponse(Object response, String httpMethod) {
239239
Status status = isGet ? Status.NOT_FOUND : Status.NO_CONTENT;
240240
return Response.status(status).build();
241241
}
242-
try {
243-
if (!(response instanceof WebEndpointResponse)) {
244-
return Response.status(Status.OK).entity(convertIfNecessary(response)).build();
245-
}
246-
WebEndpointResponse<?> webEndpointResponse = (WebEndpointResponse<?>) response;
247-
return Response.status(webEndpointResponse.getStatus())
248-
.header("Content-Type", webEndpointResponse.getContentType())
249-
.entity(convertIfNecessary(webEndpointResponse.getBody())).build();
250-
}
251-
catch (IOException ex) {
252-
return Response.status(Status.INTERNAL_SERVER_ERROR).build();
242+
if (!(response instanceof WebEndpointResponse)) {
243+
return Response.status(Status.OK).entity(convertIfNecessary(response)).build();
253244
}
245+
WebEndpointResponse<?> webEndpointResponse = (WebEndpointResponse<?>) response;
246+
return Response.status(webEndpointResponse.getStatus())
247+
.header("Content-Type", webEndpointResponse.getContentType())
248+
.entity(convertIfNecessary(webEndpointResponse.getBody())).build();
254249
}
255250

256-
private Object convertIfNecessary(Object body) throws IOException {
251+
private Object convertIfNecessary(Object body) {
257252
for (Function<Object, Object> converter : BODY_CONVERTERS) {
258253
body = converter.apply(body);
259254
}

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java

-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ public AbstractWebMvcEndpointHandlerMapping(EndpointMapping endpointMapping,
140140
}
141141

142142
@Override
143-
@SuppressWarnings("deprecation")
144143
public void afterPropertiesSet() {
145144
this.builderConfig = new RequestMappingInfo.BuilderConfiguration();
146145
this.builderConfig.setPatternParser(getPatternParser());

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/ControllerEndpointHandlerMapping.java

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMappi
5858
* @param endpoints the web endpoints
5959
* @param corsConfiguration the CORS configuration for the endpoints or {@code null}
6060
*/
61-
@SuppressWarnings("deprecation")
6261
public ControllerEndpointHandlerMapping(EndpointMapping endpointMapping,
6362
Collection<ExposableControllerEndpoint> endpoints, CorsConfiguration corsConfiguration) {
6463
Assert.notNull(endpointMapping, "EndpointMapping must not be null");

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/client/DefaultRestTemplateExchangeTagsProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* {@link org.springframework.http.client.observation.DefaultClientRequestObservationConvention}
3535
*/
3636
@Deprecated(since = "3.0.0", forRemoval = true)
37-
@SuppressWarnings({ "deprecation", "removal" })
37+
@SuppressWarnings("removal")
3838
public class DefaultRestTemplateExchangeTagsProvider implements RestTemplateExchangeTagsProvider {
3939

4040
@Override

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/client/DefaultWebClientExchangeTagsProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* {@link org.springframework.web.reactive.function.client.ClientRequestObservationConvention}
3434
*/
3535
@Deprecated(since = "3.0.0", forRemoval = true)
36-
@SuppressWarnings({ "deprecation", "removal" })
36+
@SuppressWarnings("removal")
3737
public class DefaultWebClientExchangeTagsProvider implements WebClientExchangeTagsProvider {
3838

3939
@Override

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/DefaultWebMvcTagsProviderTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* @author Andy Wilkinson
4242
*/
4343
@SuppressWarnings("removal")
44+
@Deprecated(since = "3.0.0", forRemoval = true)
4445
class DefaultWebMvcTagsProviderTests {
4546

4647
@Test

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/WebMvcTagsTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@
3535
* @author Michael McFadyen
3636
*/
3737
@SuppressWarnings("removal")
38+
@Deprecated(since = "3.0.0", forRemoval = true)
3839
class WebMvcTagsTests {
3940

4041
private final MockHttpServletRequest request = new MockHttpServletRequest();

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/client/ObservationWebClientCustomizerTests.java

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
*
3131
* @author Brian Clozel
3232
*/
33-
@SuppressWarnings("deprecation")
3433
class ObservationWebClientCustomizerTests {
3534

3635
private static final String TEST_METRIC_NAME = "http.test.metric.name";

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/DefaultWebFluxTagsProviderTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
* @author Andy Wilkinson
3939
*/
4040
@SuppressWarnings("removal")
41+
@Deprecated(since = "3.0.0", forRemoval = true)
4142
class DefaultWebFluxTagsProviderTests {
4243

4344
@Test

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTagsTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* @author Stephane Nicoll
4646
*/
4747
@SuppressWarnings("removal")
48+
@Deprecated(since = "3.0.0", forRemoval = true)
4849
class WebFluxTagsTests {
4950

5051
private MockServerWebExchange exchange;

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java

-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ private GenericHttpMessageConverter<Object> asGenericHttpMessageConverter(HttpMe
180180
}
181181

182182
@Bean
183-
@SuppressWarnings("deprecation")
184183
public HandlerMapping graphQlWebSocketMapping(GraphQlWebSocketHandler handler, GraphQlProperties properties) {
185184
String path = properties.getWebsocket().getPath();
186185
logger.info(LogMessage.format("GraphQL endpoint WebSocket %s", path));

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java

-3
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ void autoConfigurationWhenIntrospectionUriAvailableShouldBeConditionalOnClass()
423423
.run((context) -> assertThat(context).doesNotHaveBean(OpaqueTokenIntrospector.class));
424424
}
425425

426-
@SuppressWarnings("unchecked")
427426
@Test
428427
void autoConfigurationShouldConfigureResourceServerUsingJwkSetUriAndIssuerUri() throws Exception {
429428
this.server = new MockWebServer();
@@ -445,7 +444,6 @@ void autoConfigurationShouldConfigureResourceServerUsingJwkSetUriAndIssuerUri()
445444
});
446445
}
447446

448-
@SuppressWarnings("unchecked")
449447
@Test
450448
void autoConfigurationShouldNotConfigureIssuerUriAndAudienceJwtValidatorIfPropertyNotConfigured() throws Exception {
451449
this.server = new MockWebServer();
@@ -523,7 +521,6 @@ private void validate(String issuerUri, JwtDecoder jwtDecoder) throws MalformedU
523521
validateDelegates(issuerUri, delegates);
524522
}
525523

526-
@SuppressWarnings("unchecked")
527524
private void validateDelegates(String issuerUri, Collection<OAuth2TokenValidator<Jwt>> delegates) {
528525
assertThat(delegates).hasAtLeastOneElementOfType(JwtClaimValidator.class);
529526
OAuth2TokenValidator<Jwt> delegatingValidator = delegates.stream()

Diff for: spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfiguration.java

-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ LiveReloadServerEventListener liveReloadServerEventListener(OptionalLiveReloadSe
9999
@ConditionalOnProperty(prefix = "spring.devtools.restart", name = "enabled", matchIfMissing = true)
100100
static class RestartConfiguration {
101101

102-
private static final Log restarterLogger = LogFactory.getLog(Restarter.class);
103-
104102
private final DevToolsProperties properties;
105103

106104
RestartConfiguration(DevToolsProperties properties) {

Diff for: spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/SpringBootDependencyInjectionTestExecutionListenerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void orderShouldBeSameAsDependencyInjectionTestExecutionListener() {
5353
}
5454

5555
@Test
56-
@SuppressWarnings("unchecked")
56+
@SuppressWarnings({ "unchecked", "rawtypes" })
5757
void prepareFailingTestInstanceShouldPrintReport(CapturedOutput output) throws Exception {
5858
TestContext testContext = mock(TestContext.class);
5959
given(testContext.getTestClass()).willReturn((Class) Config.class);
@@ -73,7 +73,7 @@ void prepareFailingTestInstanceShouldPrintReport(CapturedOutput output) throws E
7373
}
7474

7575
@Test
76-
@SuppressWarnings("unchecked")
76+
@SuppressWarnings({ "unchecked", "rawtypes" })
7777
void originalFailureIsThrownWhenReportGenerationFails() {
7878
TestContext testContext = mock(TestContext.class);
7979
given(testContext.getTestClass()).willReturn((Class) Config.class);

Diff for: spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/ExampleProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package org.springframework.boot.test.autoconfigure.web.client;
1818

1919
import org.springframework.boot.context.properties.ConfigurationProperties;
20-
import org.springframework.boot.context.properties.ConstructorBinding;
20+
import org.springframework.boot.context.properties.bind.ConstructorBinding;
2121
import org.springframework.boot.context.properties.bind.DefaultValue;
2222

2323
/**

Diff for: spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
class AutoConfigureAnnotationProcessorTests {
4040

4141
@Test
42-
void annotatedClass() throws Exception {
42+
void annotatedClass() {
4343
compile(TestClassConfiguration.class, (properties) -> {
4444
assertThat(properties).hasSize(7);
4545
assertThat(properties).containsEntry(
@@ -108,7 +108,7 @@ void annotatedClassWithOrder() {
108108
}
109109

110110
@Test
111-
void annotatedClassWithAutoConfiguration() throws Exception {
111+
void annotatedClassWithAutoConfiguration() {
112112
compile(TestAutoConfigurationConfiguration.class, (properties) -> {
113113
assertThat(properties).containsEntry(
114114
"org.springframework.boot.autoconfigureprocessor.TestAutoConfigurationConfiguration", "");
@@ -122,7 +122,7 @@ void annotatedClassWithAutoConfiguration() throws Exception {
122122
}
123123

124124
@Test
125-
void annotatedClassWithAutoConfigurationMerged() throws Exception {
125+
void annotatedClassWithAutoConfigurationMerged() {
126126
compile(TestMergedAutoConfigurationConfiguration.class, (properties) -> {
127127
assertThat(properties).containsEntry(
128128
"org.springframework.boot.autoconfigureprocessor.TestMergedAutoConfigurationConfiguration", "");
@@ -136,7 +136,7 @@ void annotatedClassWithAutoConfigurationMerged() throws Exception {
136136
}
137137

138138
@Test // gh-19370
139-
void propertiesAreFullRepeatable() throws Exception {
139+
void propertiesAreFullRepeatable() {
140140
process(TestOrderedClassConfiguration.class, (firstFile) -> {
141141
String first = getFileContents(firstFile);
142142
process(TestOrderedClassConfiguration.class, (secondFile) -> {

Diff for: spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/MetadataStore.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public ConfigurationMetadata readAdditionalMetadata() throws IOException {
7676
return readMetadata(getAdditionalMetadataStream());
7777
}
7878

79-
private ConfigurationMetadata readMetadata(InputStream in) throws IOException {
79+
private ConfigurationMetadata readMetadata(InputStream in) {
8080
try (in) {
8181
return new JsonMarshaller().read(in);
8282
}

Diff for: spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessorTests.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.boot.configurationprocessor;
1818

19-
import java.io.IOException;
20-
2119
import org.junit.jupiter.api.Test;
2220

2321
import org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata;
@@ -414,7 +412,7 @@ void recursivePropertiesDoNotCauseAStackOverflow() {
414412
}
415413

416414
@Test
417-
void recordProperties() throws IOException {
415+
void recordProperties() {
418416
String source = """
419417
@org.springframework.boot.configurationsample.ConfigurationProperties("implicit")
420418
public record ExampleRecord(String someString, Integer someInteger) {
@@ -426,7 +424,7 @@ public record ExampleRecord(String someString, Integer someInteger) {
426424
}
427425

428426
@Test
429-
void recordPropertiesWithDefaultValues() throws IOException {
427+
void recordPropertiesWithDefaultValues() {
430428
String source = """
431429
@org.springframework.boot.configurationsample.ConfigurationProperties("record.defaults")
432430
public record ExampleRecord(
@@ -442,7 +440,7 @@ public record ExampleRecord(
442440
}
443441

444442
@Test
445-
void multiConstructorRecordProperties() throws IOException {
443+
void multiConstructorRecordProperties() {
446444
String source = """
447445
@org.springframework.boot.configurationsample.ConfigurationProperties("multi")
448446
public record ExampleRecord(String someString, Integer someInteger) {

0 commit comments

Comments
 (0)