diff --git a/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java b/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java index 3b8d79c44063..0638d6f00350 100644 --- a/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java +++ b/core/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java @@ -119,10 +119,10 @@ void bindToCollectionWhenNonSequentialShouldThrowException() { .satisfies((ex) -> { Set unbound = ((UnboundConfigurationPropertiesException) ex.getCause()) .getUnboundProperties(); - assertThat(unbound).hasSize(1); - ConfigurationProperty property = unbound.iterator().next(); - assertThat(property.getName()).hasToString("foo[3]"); - assertThat(property.getValue()).isEqualTo("3"); + assertThat(unbound).singleElement().satisfies((property) -> { + assertThat(property.getName()).hasToString("foo[3]"); + assertThat(property.getValue()).isEqualTo("3"); + }); }); } @@ -139,10 +139,10 @@ void bindToCollectionWhenNonKnownIndexedChildNotBoundThrowsException() { .satisfies((ex) -> { Set unbound = ((UnboundConfigurationPropertiesException) ex.getCause()) .getUnboundProperties(); - assertThat(unbound).hasSize(1); - ConfigurationProperty property = unbound.iterator().next(); - assertThat(property.getName()).hasToString("foo[1].missing"); - assertThat(property.getValue()).isEqualTo("bad"); + assertThat(unbound).singleElement().satisfies((property) -> { + assertThat(property.getName()).hasToString("foo[1].missing"); + assertThat(property.getValue()).isEqualTo("bad"); + }); }); } @@ -155,10 +155,10 @@ void bindToNestedCollectionWhenNonKnownIndexed() { source.put("foo[0].string", "test"); this.sources.add(source); List list = this.binder.bind("foo", Bindable.listOf(ExampleCollectionBean.class)).get(); - assertThat(list).hasSize(1); - ExampleCollectionBean bean = list.get(0); - assertThat(bean.getItems()).containsExactly("a", "b", "d"); - assertThat(bean.getString()).isEqualTo("test"); + assertThat(list).singleElement().satisfies((bean) -> { + assertThat(bean.getItems()).containsExactly("a", "b", "d"); + assertThat(bean.getString()).isEqualTo("test"); + }); } @Test @@ -173,10 +173,10 @@ void bindToNonScalarCollectionWhenNonSequentialShouldThrowException() { .satisfies((ex) -> { Set unbound = ((UnboundConfigurationPropertiesException) ex.getCause()) .getUnboundProperties(); - assertThat(unbound).hasSize(1); - ConfigurationProperty property = unbound.iterator().next(); - assertThat(property.getName()).hasToString("foo[4].value"); - assertThat(property.getValue()).isEqualTo("4"); + assertThat(unbound).singleElement().satisfies((property) -> { + assertThat(property.getName()).hasToString("foo[4].value"); + assertThat(property.getValue()).isEqualTo("4"); + }); }); } diff --git a/module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitTemplateConfigurer.java b/module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitTemplateConfigurer.java index 2273e1d85859..a8af90eba1a0 100644 --- a/module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitTemplateConfigurer.java +++ b/module/spring-boot-amqp/src/main/java/org/springframework/boot/amqp/autoconfigure/RabbitTemplateConfigurer.java @@ -33,7 +33,7 @@ * properties. *

* Can be injected into application code and used to define a custom - * {@code RabbitTemplateConfigurer} whose configuration is based upon that produced by + * {@code RabbitTemplate} whose configuration is based upon that produced by * auto-configuration. * * @author Stephane Nicoll diff --git a/module/spring-boot-http-converter/src/main/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConvertersProperties.java b/module/spring-boot-http-converter/src/main/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConvertersProperties.java index fb141e1fec32..47ffe28c21ff 100644 --- a/module/spring-boot-http-converter/src/main/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConvertersProperties.java +++ b/module/spring-boot-http-converter/src/main/java/org/springframework/boot/http/converter/autoconfigure/HttpMessageConvertersProperties.java @@ -31,7 +31,7 @@ public class HttpMessageConvertersProperties { /** - * The charset to use for String conversion. + * Charset to use for String conversion. */ private Charset stringEncodingCharset = StandardCharsets.UTF_8; diff --git a/module/spring-boot-observation/src/main/java/org/springframework/boot/observation/autoconfigure/ObservationHandlerGroup.java b/module/spring-boot-observation/src/main/java/org/springframework/boot/observation/autoconfigure/ObservationHandlerGroup.java index fb318c0ca449..85a86639d14b 100644 --- a/module/spring-boot-observation/src/main/java/org/springframework/boot/observation/autoconfigure/ObservationHandlerGroup.java +++ b/module/spring-boot-observation/src/main/java/org/springframework/boot/observation/autoconfigure/ObservationHandlerGroup.java @@ -65,7 +65,7 @@ default int compareTo(ObservationHandlerGroup other) { Class handlerType(); /** - * Static factory method to create a {@link ObservationHandlerGroup} with members of + * Static factory method to create an {@link ObservationHandlerGroup} with members of * the given handler type. * @param the handler type * @param handlerType the handler type diff --git a/module/spring-boot-observation/src/main/java/org/springframework/boot/observation/autoconfigure/ObservationHandlerGroups.java b/module/spring-boot-observation/src/main/java/org/springframework/boot/observation/autoconfigure/ObservationHandlerGroups.java index 688dc705e889..5bf93b999d5a 100644 --- a/module/spring-boot-observation/src/main/java/org/springframework/boot/observation/autoconfigure/ObservationHandlerGroups.java +++ b/module/spring-boot-observation/src/main/java/org/springframework/boot/observation/autoconfigure/ObservationHandlerGroups.java @@ -29,7 +29,7 @@ import org.springframework.util.MultiValueMap; /** - * A collection {@link ObservationHandlerGroup} instance and supporting registration + * A collection of {@link ObservationHandlerGroup} instances and supporting registration * logic. * * @author Andy Wilkinson diff --git a/module/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/autoconfigure/TracingAndMeterObservationHandlerGroup.java b/module/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/autoconfigure/TracingAndMeterObservationHandlerGroup.java index f475f66ed202..57276a6b9edc 100644 --- a/module/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/autoconfigure/TracingAndMeterObservationHandlerGroup.java +++ b/module/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/autoconfigure/TracingAndMeterObservationHandlerGroup.java @@ -32,7 +32,7 @@ /** * {@link ObservationHandlerGroup} that considers both {@link TracingObservationHandler} * and {@link MeterObservationHandler} types as members. This group takes precedence over - * any regular {@link MeterObservationHandler} group in order to use ensure + * any regular {@link MeterObservationHandler} group in order to ensure * {@link TracingAwareMeterObservationHandler} wrapping is applied during registration. * * @author Phillip Webb