This commit is contained in:
Johnny Lim
2018-02-20 05:47:01 +09:00
committed by Phillip Webb
parent cc9a5b72e1
commit 88b184ca23
14 changed files with 27 additions and 29 deletions

View File

@@ -51,7 +51,7 @@ public enum StaticResourceLocation {
*/
FAVICON("/**/favicon.ico");
private String[] patterns;
private final String[] patterns;
StaticResourceLocation(String... patterns) {
this.patterns = patterns;

View File

@@ -33,7 +33,7 @@ public final class PathRequest {
/**
* Returns a {@link StaticResourceRequest} that can be used to create a matcher for
* {@link StaticResourceLocation Locations}.
* {@link StaticResourceLocation locations}.
* @return a {@link StaticResourceRequest}
*/
public static StaticResourceRequest toStaticResources() {

View File

@@ -90,7 +90,7 @@ public final class StaticResourceRequest {
/**
* The server web exchange matcher used to match against resource
* {@link StaticResourceLocation Locations}.
* {@link StaticResourceLocation locations}.
*/
public static final class StaticResourceServerWebExchange
implements ServerWebExchangeMatcher {

View File

@@ -38,7 +38,7 @@ public final class PathRequest {
/**
* Returns a {@link StaticResourceRequest} that can be used to create a matcher for
* {@link StaticResourceLocation Locations}.
* {@link StaticResourceLocation locations}.
* @return a {@link StaticResourceRequest}
*/
public static StaticResourceRequest toStaticResources() {

View File

@@ -90,12 +90,10 @@ public class StaticResourceRequestTests {
this.resourceRequest.atCommonLocations().excluding(null);
}
private StaticResourceRequestTests.RequestMatcherAssert assertMatcher(
ServerWebExchangeMatcher matcher) {
private RequestMatcherAssert assertMatcher(ServerWebExchangeMatcher matcher) {
StaticWebApplicationContext context = new StaticWebApplicationContext();
context.registerBean(ServerProperties.class);
return assertThat(
new StaticResourceRequestTests.RequestMatcherAssert(context, matcher));
return assertThat(new RequestMatcherAssert(context, matcher));
}
private static class RequestMatcherAssert implements AssertDelegateTarget {