Skip to content

Commit 4490c52

Browse files
committed
Merge branch '3.5.x'
Closes gh-46540
2 parents 287d5c3 + 743e715 commit 4490c52

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ void bindToCollectionWhenNonSequentialShouldThrowException() {
119119
.satisfies((ex) -> {
120120
Set<ConfigurationProperty> unbound = ((UnboundConfigurationPropertiesException) ex.getCause())
121121
.getUnboundProperties();
122-
assertThat(unbound).hasSize(1);
123-
ConfigurationProperty property = unbound.iterator().next();
124-
assertThat(property.getName()).hasToString("foo[3]");
125-
assertThat(property.getValue()).isEqualTo("3");
122+
assertThat(unbound).singleElement().satisfies((property) -> {
123+
assertThat(property.getName()).hasToString("foo[3]");
124+
assertThat(property.getValue()).isEqualTo("3");
125+
});
126126
});
127127
}
128128

@@ -139,10 +139,10 @@ void bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() {
139139
.satisfies((ex) -> {
140140
Set<ConfigurationProperty> unbound = ((UnboundConfigurationPropertiesException) ex.getCause())
141141
.getUnboundProperties();
142-
assertThat(unbound).hasSize(1);
143-
ConfigurationProperty property = unbound.iterator().next();
144-
assertThat(property.getName()).hasToString("foo[1].missing");
145-
assertThat(property.getValue()).isEqualTo("bad");
142+
assertThat(unbound).singleElement().satisfies((property) -> {
143+
assertThat(property.getName()).hasToString("foo[1].missing");
144+
assertThat(property.getValue()).isEqualTo("bad");
145+
});
146146
});
147147
}
148148

@@ -155,10 +155,10 @@ void bindToNestedCollectionWhenNonKnownIndexed() {
155155
source.put("foo[0].string", "test");
156156
this.sources.add(source);
157157
List<ExampleCollectionBean> list = this.binder.bind("foo", Bindable.listOf(ExampleCollectionBean.class)).get();
158-
assertThat(list).hasSize(1);
159-
ExampleCollectionBean bean = list.get(0);
160-
assertThat(bean.getItems()).containsExactly("a", "b", "d");
161-
assertThat(bean.getString()).isEqualTo("test");
158+
assertThat(list).singleElement().satisfies((bean) -> {
159+
assertThat(bean.getItems()).containsExactly("a", "b", "d");
160+
assertThat(bean.getString()).isEqualTo("test");
161+
});
162162
}
163163

164164
@Test
@@ -173,10 +173,10 @@ void bindToNonScalarCollectionWhenNonSequentialShouldThrowException() {
173173
.satisfies((ex) -> {
174174
Set<ConfigurationProperty> unbound = ((UnboundConfigurationPropertiesException) ex.getCause())
175175
.getUnboundProperties();
176-
assertThat(unbound).hasSize(1);
177-
ConfigurationProperty property = unbound.iterator().next();
178-
assertThat(property.getName()).hasToString("foo[4].value");
179-
assertThat(property.getValue()).isEqualTo("4");
176+
assertThat(unbound).singleElement().satisfies((property) -> {
177+
assertThat(property.getName()).hasToString("foo[4].value");
178+
assertThat(property.getValue()).isEqualTo("4");
179+
});
180180
});
181181
}
182182

module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitTemplateConfigurer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* properties.
3434
* <p>
3535
* Can be injected into application code and used to define a custom
36-
* {@code RabbitTemplateConfigurer} whose configuration is based upon that produced by
36+
* {@code RabbitTemplate} whose configuration is based upon that produced by
3737
* auto-configuration.
3838
*
3939
* @author Stephane Nicoll

0 commit comments

Comments
 (0)