Skip to content

Commit 6d1d9eb

Browse files
committed
Polish
1 parent bc814d2 commit 6d1d9eb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzerTests.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public void failureAnalysisIsPerformed() {
5959
public void failureAnalysisIsPerformedWithActiveProfiles() {
6060
this.environment.setActiveProfiles("first", "second");
6161
FailureAnalysis failureAnalysis = performAnalysis(TestConfiguration.class);
62-
assertThat(failureAnalysis.getAction()).contains(
63-
"(the profiles first,¬second are currently active)");
62+
assertThat(failureAnalysis.getAction())
63+
.contains("(the profiles first,¬second are currently active)");
6464
}
6565

6666
private FailureAnalysis performAnalysis(Class<?> configuration) {
@@ -77,6 +77,7 @@ private BeanCreationException createFailure(Class<?> configuration) {
7777
context.setEnvironment(this.environment);
7878
context.register(configuration);
7979
context.refresh();
80+
context.close();
8081
return null;
8182
}
8283
catch (BeanCreationException ex) {

spring-boot-samples/spring-boot-sample-kafka/src/main/java/sample/kafka/SampleKafkaApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void main(String[] args) {
3030

3131
@Bean
3232
public ApplicationRunner runner(Producer producer) {
33-
return args -> producer.send(new SampleMessage(1, "A simple test message"));
33+
return (args) -> producer.send(new SampleMessage(1, "A simple test message"));
3434
}
3535

3636
}

0 commit comments

Comments
 (0)