Skip to content
Closed

Polish #12156

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
@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<? extends Enum<?>> enumType) {
return StringUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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("!");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
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;
Expand All @@ -48,9 +46,6 @@ public DelimitedStringToArrayConverterTests(String name,
this.conversionService = conversionService;
}

@Rule
public ExpectedException thrown = ExpectedException.none();

@Test
public void canConvertFromStringToArrayShouldReturnTrue() {
assertThat(this.conversionService.canConvert(String.class, String[].class))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
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;
Expand All @@ -49,9 +47,6 @@ public DelimitedStringToCollectionConverterTests(String name,
this.conversionService = conversionService;
}

@Rule
public ExpectedException thrown = ExpectedException.none();

@Test
public void canConvertFromStringToCollectionShouldReturnTrue() {
assertThat(this.conversionService.canConvert(String.class, Collection.class))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
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;
Expand All @@ -39,9 +37,6 @@
@RunWith(Parameterized.class)
public class DurationToNumberConverterTests {

@Rule
public ExpectedException thrown = ExpectedException.none();

private final ConversionService conversionService;

public DurationToNumberConverterTests(String name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
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;
Expand All @@ -39,9 +37,6 @@
@RunWith(Parameterized.class)
public class DurationToStringConverterTests {

@Rule
public ExpectedException thrown = ExpectedException.none();

private final ConversionService conversionService;

public DurationToStringConverterTests(String name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
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;
Expand All @@ -43,9 +41,6 @@
@RunWith(Parameterized.class)
public class NumberToDurationConverterTests {

@Rule
public ExpectedException thrown = ExpectedException.none();

private final ConversionService conversionService;

public NumberToDurationConverterTests(String name,
Expand Down