diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java index ebca3bd93d..a10ba43787 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java @@ -58,7 +58,7 @@ import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWit @TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true", "management.endpoints.web.exposure.include=*", "spring.jackson.default-property-inclusion=non_null" }) -public class AbstractEndpointDocumentationTests { +public abstract class AbstractEndpointDocumentationTests { protected String describeEnumValues(Class> enumType) { return StringUtils diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 816037d04a..5cc4b2aabb 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2653,7 +2653,7 @@ Spring WebFlux provides a `WebFilter` interface that can be implemented to filte request-response exchanges. `WebFilter` beans found in the application context will be automatically used to filter each exchange. -Where the order of the filters is important they can implemented `Ordered` or be annotated +Where the order of the filters is important they can implement `Ordered` or be annotated with `@Order`. Spring Boot auto-configuration may configure web filters for you. When it does so, the orders shown in the following table will be used: @@ -5721,8 +5721,8 @@ The following example shows how to inject `ConnectionFactory` instances: [[boot-features-jta-supporting-alternative-embedded]] === Supporting an Alternative Embedded Transaction Manager -The {sc-spring-boot}/jta/XAConnectionFactoryWrapper.{sc-ext}[`XAConnectionFactoryWrapper`] -and {sc-spring-boot}/jta/XADataSourceWrapper.{sc-ext}[`XADataSourceWrapper`] interfaces +The {sc-spring-boot}/jms/XAConnectionFactoryWrapper.{sc-ext}[`XAConnectionFactoryWrapper`] +and {sc-spring-boot}/jdbc/XADataSourceWrapper.{sc-ext}[`XADataSourceWrapper`] interfaces can be used to support alternative embedded transaction managers. The interfaces are responsible for wrapping `XAConnectionFactory` and `XADataSource` beans and exposing them as regular `ConnectionFactory` and `DataSource` beans, which transparently enroll in the diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/DurationFormat.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/DurationFormat.java index 41b1aec364..c08c44b2c2 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/DurationFormat.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/DurationFormat.java @@ -24,7 +24,7 @@ import java.lang.annotation.Target; import java.time.Duration; /** - * Annotation that can be used to indivate the format to use when converting a + * Annotation that can be used to indicate the format to use when converting a * {@link Duration}. * * @author Phillip Webb diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/ProfileToLoadDocumentMatcher.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/ProfileToLoadDocumentMatcher.java index 48cbf6208b..0250108589 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/ProfileToLoadDocumentMatcher.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/ProfileToLoadDocumentMatcher.java @@ -36,14 +36,15 @@ class ProfileToLoadDocumentMatcher extends SpringProfilesDocumentMatcher { @Override protected boolean matches(String[] profiles) { String[] positiveProfiles = (profiles == null ? null : Arrays.stream(profiles) - .filter(this::isPositveProfile).toArray(String[]::new)); + .filter(this::isPositiveProfile).toArray(String[]::new)); if (this.profile == null) { return ObjectUtils.isEmpty(positiveProfiles); } return ObjectUtils.containsElement(positiveProfiles, this.profile); } - private boolean isPositveProfile(String profile) { + private boolean isPositiveProfile(String profile) { return !profile.startsWith("!"); } + } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/XADataSourceWrapper.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/XADataSourceWrapper.java index 64ca58fa7a..a1f8562229 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/XADataSourceWrapper.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/XADataSourceWrapper.java @@ -21,7 +21,7 @@ import javax.sql.XADataSource; import javax.transaction.TransactionManager; /** - * Strategy interface used to wrap a JMS {@link XADataSource} enrolling it with a JTA + * Strategy interface used to wrap an {@link XADataSource} enrolling it with a JTA * {@link TransactionManager}. * * @author Phillip Webb diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToArrayConverterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToArrayConverterTests.java index 5617cc10d6..37f4f84b5d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToArrayConverterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToArrayConverterTests.java @@ -19,9 +19,7 @@ package org.springframework.boot.convert; import java.util.LinkedList; import java.util.List; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; @@ -48,9 +46,6 @@ public class DelimitedStringToArrayConverterTests { this.conversionService = conversionService; } - @Rule - public ExpectedException thrown = ExpectedException.none(); - @Test public void canConvertFromStringToArrayShouldReturnTrue() { assertThat(this.conversionService.canConvert(String.class, String[].class)) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToCollectionConverterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToCollectionConverterTests.java index 4ea3bbd168..4043ac9972 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToCollectionConverterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DelimitedStringToCollectionConverterTests.java @@ -20,9 +20,7 @@ import java.util.Collection; import java.util.LinkedList; import java.util.List; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; @@ -49,9 +47,6 @@ public class DelimitedStringToCollectionConverterTests { this.conversionService = conversionService; } - @Rule - public ExpectedException thrown = ExpectedException.none(); - @Test public void canConvertFromStringToCollectionShouldReturnTrue() { assertThat(this.conversionService.canConvert(String.class, Collection.class)) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DurationToNumberConverterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DurationToNumberConverterTests.java index e3994b7a24..815f5480d4 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DurationToNumberConverterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DurationToNumberConverterTests.java @@ -19,9 +19,7 @@ package org.springframework.boot.convert; import java.time.Duration; import java.time.temporal.ChronoUnit; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; @@ -39,9 +37,6 @@ import static org.assertj.core.api.Assertions.assertThat; @RunWith(Parameterized.class) public class DurationToNumberConverterTests { - @Rule - public ExpectedException thrown = ExpectedException.none(); - private final ConversionService conversionService; public DurationToNumberConverterTests(String name, diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DurationToStringConverterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DurationToStringConverterTests.java index 990e98e569..8bbeb7411d 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DurationToStringConverterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/DurationToStringConverterTests.java @@ -19,9 +19,7 @@ package org.springframework.boot.convert; import java.time.Duration; import java.time.temporal.ChronoUnit; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; @@ -39,9 +37,6 @@ import static org.assertj.core.api.Assertions.assertThat; @RunWith(Parameterized.class) public class DurationToStringConverterTests { - @Rule - public ExpectedException thrown = ExpectedException.none(); - private final ConversionService conversionService; public DurationToStringConverterTests(String name, diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/NumberToDurationConverterTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/NumberToDurationConverterTests.java index 4159fc56ff..83799665d7 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/NumberToDurationConverterTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/convert/NumberToDurationConverterTests.java @@ -20,9 +20,7 @@ import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.Collections; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; @@ -43,9 +41,6 @@ import static org.mockito.Mockito.mock; @RunWith(Parameterized.class) public class NumberToDurationConverterTests { - @Rule - public ExpectedException thrown = ExpectedException.none(); - private final ConversionService conversionService; public NumberToDurationConverterTests(String name,