Skip to content

Commit aeaf52e

Browse files
committed
Merge branch '6.2.x'
2 parents e09cdcd + 8334cb1 commit aeaf52e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Diff for: spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PathResourceLookupFunctionTests.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest;
3232
import org.springframework.web.testfixture.server.MockServerWebExchange;
3333

34+
import static org.assertj.core.api.Assertions.assertThatNoException;
35+
3436
/**
3537
* @author Arjen Poutsma
3638
*/
@@ -128,13 +130,13 @@ void composeResourceLookupFunction() {
128130
@SuppressWarnings("removal")
129131
void withPathResource() {
130132
org.springframework.core.io.PathResource location = new org.springframework.core.io.PathResource("/static/");
131-
PathResourceLookupFunction function = new PathResourceLookupFunction("/resources/**", location);
133+
assertThatNoException().isThrownBy(() -> new PathResourceLookupFunction("/resources/**", location));
132134
}
133135

134136
@Test
135137
void withFileSystemResource() {
136138
FileSystemResource location = new FileSystemResource("/static/");
137-
PathResourceLookupFunction function = new PathResourceLookupFunction("/resources/**", location);
139+
assertThatNoException().isThrownBy(() -> new PathResourceLookupFunction("/resources/**", location));
138140
}
139141

140142
}

Diff for: spring-webmvc/src/test/java/org/springframework/web/servlet/function/PathResourceLookupFunctionTests.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.springframework.web.servlet.handler.PathPatternsTestUtils;
3030

3131
import static org.assertj.core.api.Assertions.assertThat;
32+
import static org.assertj.core.api.Assertions.assertThatNoException;
3233

3334
/**
3435
* @author Arjen Poutsma
@@ -107,13 +108,13 @@ private ServerRequest initRequest(String httpMethod, String requestUri) {
107108
@SuppressWarnings("removal")
108109
void withPathResource() {
109110
org.springframework.core.io.PathResource location = new org.springframework.core.io.PathResource("/static/");
110-
PathResourceLookupFunction function = new PathResourceLookupFunction("/resources/**", location);
111+
assertThatNoException().isThrownBy(() -> new PathResourceLookupFunction("/resources/**", location));
111112
}
112113

113114
@Test
114115
void withFileSystemResource() {
115116
FileSystemResource location = new FileSystemResource("/static/");
116-
PathResourceLookupFunction function = new PathResourceLookupFunction("/resources/**", location);
117+
assertThatNoException().isThrownBy(() -> new PathResourceLookupFunction("/resources/**", location));
117118
}
118119

119120
}

0 commit comments

Comments
 (0)