Merge pull request #11720 from izeye

* pr/11720:
  Polish
pull/11466/merge
Phillip Webb 7 years ago
commit 2735f57b0d

@ -55,7 +55,7 @@ public final class EndpointRequest {
* {@link EndpointServerWebExchangeMatcher#excluding(Class...) excluding} method can
* be used to further remove specific endpoints if required. For example:
* <pre class="code">
* EndpointServerWebExchangeMatcher.toAnyEndpoint().excluding(ShutdownEndpoint.class)
* EndpointRequest.toAnyEndpoint().excluding(ShutdownEndpoint.class)
* </pre>
* @return the configured {@link ServerWebExchangeMatcher}
*/

@ -40,7 +40,7 @@ public abstract class AbstractDiscoveredEndpoint<O extends Operation>
private final Object endpointBean;
/**
* Create a mew {@link AbstractDiscoveredEndpoint} instance.
* Create a new {@link AbstractDiscoveredEndpoint} instance.
* @param discoverer the discoverer that discovered the endpoint
* @param endpointBean the primary source bean
* @param id the ID of the endpoint

@ -45,7 +45,7 @@ import org.springframework.util.StringUtils;
* A discovered {@link JmxOperation JMX operation}.
*
* @author Stephane Nicoll
* @author Philip Webb
* @author Phillip Webb
*/
class DiscoveredJmxOperation extends AbstractDiscoveredOperation implements JmxOperation {

@ -161,7 +161,7 @@ public class EndpointDiscovererTests {
}
@Test
public void getEndpointsWhenTtlSetByIdAndIdDoesntMatchShouldNotCacheInvokeCalls() {
public void getEndpointsWhenTtlSetByIdAndIdDoesNotMatchShouldNotCacheInvokeCalls() {
load(TestEndpointConfiguration.class, (context) -> {
TestEndpointDiscoverer discoverer = new TestEndpointDiscoverer(context,
(endpointId) -> (endpointId.equals("foo") ? 500L : 0L));

@ -43,7 +43,7 @@ public class OperationMethodParameterTests {
}
@Test
public void getTypeShouldReturnTyoe() {
public void getTypeShouldReturnType() {
OperationMethodParameter parameter = new OperationMethodParameter("name",
this.method.getParameters()[0]);
assertThat(parameter.getType()).isEqualTo(String.class);

@ -73,7 +73,7 @@ public class ReflectiveOperationInvokerTests {
}
@Test
public void createWhenParamaterValueMapperIsNullShouldThrowException() {
public void createWhenParameterValueMapperIsNullShouldThrowException() {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("ParameterValueMapper must not be null");
new ReflectiveOperationInvoker(this.target, this.operationMethod, null);
@ -88,7 +88,7 @@ public class ReflectiveOperationInvokerTests {
}
@Test
public void invokeWhenMissingNonNullableArgmentShouldThrowException() {
public void invokeWhenMissingNonNullableArgumentShouldThrowException() {
ReflectiveOperationInvoker invoker = new ReflectiveOperationInvoker(this.target,
this.operationMethod, this.parameterValueMapper);
this.thrown.expect(MissingParametersException.class);

@ -49,7 +49,7 @@ public class WebEndpointResponseTests {
}
@Test
public void createWhithBodyAndStatusShouldReturnStatusAndBody() {
public void createWithBodyAndStatusShouldReturnStatusAndBody() {
WebEndpointResponse<Object> response = new WebEndpointResponse<>("body", 500);
assertThat(response.getStatus()).isEqualTo(500);
assertThat(response.getBody()).isEqualTo("body");

@ -186,7 +186,7 @@ public class FileSystemWatcher {
* @param remainingScans the number of remaining scans
*/
void stopAfter(int remainingScans) {
Thread thread = null;
Thread thread;
synchronized (this.monitor) {
thread = this.watchThread;
if (thread != null) {

@ -1225,7 +1225,7 @@ content into your application. Rather, pick only the properties that you need.
management.endpoint.loggers.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.loggers.enabled= # Whether to enable the loggers endpoint.
# REQUEST MAPPING ENDPOINT ({sc-spring-boot-actuator}/web/MappingsEndpoint.{sc-ext}[MappingsEndpoint])
# REQUEST MAPPING ENDPOINT ({sc-spring-boot-actuator}/web/mappings/MappingsEndpoint.{sc-ext}[MappingsEndpoint])
management.endpoint.mappings.cache.time-to-live=0ms # Maximum time that a response can be cached.
management.endpoint.mappings.enabled= # Whether to enable the mappings endpoint.

@ -2391,7 +2391,7 @@ following example:
}
@GetMapping("/{user}/customers")
Flux<Customer> getUserCustomers(@PathVariable Long user) {
public Flux<Customer> getUserCustomers(@PathVariable Long user) {
// ...
}
@ -2437,7 +2437,7 @@ actual handling of the requests, as shown in the following example:
}
----
WebFlux is part of the Spring Framework. and detailed information is available in its
WebFlux is part of the Spring Framework and detailed information is available in its
{spring-reference}web-reactive.html#webflux-fn[reference documentation].
TIP: You can define as many `RouterFunction` beans as you like to modularize the
@ -6313,7 +6313,7 @@ Often, `@WebFluxTest` is limited to a single controller and used in combination
`@MockBean` annotation to provide mock implementations for required collaborators.
`@WebFluxTest` also auto-configures
{spring-reference}testing.html#webtestclient[`WebTestClient`]`WebTestClient`, which offers
{spring-reference}testing.html#webtestclient[`WebTestClient`], which offers
a powerful way to quickly test WebFlux controllers without needing to start a full HTTP
server.

@ -42,4 +42,4 @@ public class RandomPortTestRestTemplateExampleTests {
}
}
// tag::test-random-port[]
// end::test-random-port[]

@ -41,4 +41,4 @@ public class RandomPortWebTestClientExampleTests {
}
}
// tag::test-random-port[]
// end::test-random-port[]

@ -36,7 +36,7 @@ import org.springframework.core.env.PropertySource;
import org.springframework.util.StringUtils;
/**
* A {@link FailureAnalyzer} that performs analysis of failures caused by a
* A {@link FailureAnalyzer} that performs analysis of failures caused by an
* {@link InvalidConfigurationPropertyValueException}.
*
* @author Stephane Nicoll

@ -610,9 +610,8 @@ public class MapBinderTests {
@Override
public Map<String, String> convert(String s) {
Map<String, String> map = new HashMap<>();
StringUtils.commaDelimitedListToSet(s).forEach((k) -> map.put(k, ""));
return map;
return StringUtils.commaDelimitedListToSet(s).stream()
.collect(Collectors.toMap((k) -> k, (k) -> ""));
}
}

@ -65,7 +65,7 @@ public class FailureAnalyzersTests {
}
@Test
public void environmentIsInjectedIntEnvironmentAwareFailureAnalyzers() {
public void environmentIsInjectedIntoEnvironmentAwareFailureAnalyzers() {
RuntimeException failure = new RuntimeException();
analyzeAndReport("basic.factories", failure);
verify(failureAnalyzer).setEnvironment(any(Environment.class));

@ -97,7 +97,7 @@ public class SampleSecureWebFluxCustomSecurityTests {
}
@Bean
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange().matchers(EndpointRequest.to("health", "info"))
.permitAll().matchers(EndpointRequest.toAnyEndpoint())
.hasRole("ACTUATOR")

Loading…
Cancel
Save