Skip to content

Commit fd13a2e

Browse files
committed
Avoid unclosed resource false positive
1 parent 3beec78 commit fd13a2e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/tracing/zipkin/ZipkinConfigurationsSenderConfigurationTests.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@ void shouldBackOffOnCustomBeans() {
7878
void shouldUseCustomHttpEndpointSupplierFactory() {
7979
this.contextRunner.withUserConfiguration(CustomHttpEndpointSupplierFactoryConfiguration.class)
8080
.withClassLoader(new FilteredClassLoader(HttpClient.class))
81-
.run((context) -> assertThat(context.getBean(URLConnectionSender.class))
82-
.extracting("delegate.endpointSupplier")
83-
.isInstanceOf(CustomHttpEndpointSupplier.class));
81+
.run((context) -> {
82+
URLConnectionSender urlConnectionSender = context.getBean(URLConnectionSender.class);
83+
assertThat(urlConnectionSender)
84+
.extracting("delegate.endpointSupplier")
85+
.isInstanceOf(CustomHttpEndpointSupplier.class);
86+
});
8487
}
8588

8689
@Configuration(proxyBeanMethods = false)

0 commit comments

Comments
 (0)