Skip to content

Commit 9cc74e7

Browse files
committed
Refine "Redirecting to a resource" section code sample
The commit updates the code sample to use a null element friendly list. Closes gh-32423
1 parent 9910df8 commit 9cc74e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

framework-docs/modules/ROOT/pages/web/webflux-functional.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ Java::
803803
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
804804
----
805805
ClassPathResource index = new ClassPathResource("static/index.html");
806-
List<String> extensions = List.of("js", "css", "ico", "png", "jpg", "gif");
806+
List<String> extensions = Arrays.asList("js", "css", "ico", "png", "jpg", "gif");
807807
RequestPredicate spaPredicate = path("/api/**").or(path("/error")).or(pathExtension(extensions::contains)).negate();
808808
RouterFunction<ServerResponse> redirectToIndex = route()
809809
.resource(spaPredicate, index)

framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ Java::
781781
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
782782
----
783783
ClassPathResource index = new ClassPathResource("static/index.html");
784-
List<String> extensions = List.of("js", "css", "ico", "png", "jpg", "gif");
784+
List<String> extensions = Arrays.asList("js", "css", "ico", "png", "jpg", "gif");
785785
RequestPredicate spaPredicate = path("/api/**").or(path("/error")).or(pathExtension(extensions::contains)).negate();
786786
RouterFunction<ServerResponse> redirectToIndex = route()
787787
.resource(spaPredicate, index)

0 commit comments

Comments
 (0)