Skip to content

Commit b3edd39

Browse files
committed
Fix failing test due to Java 11 syntax usage
1 parent 83fb341 commit b3edd39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vertx-web/src/test/java/io/vertx/ext/web/handler/StaticHandlerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import java.util.concurrent.atomic.AtomicBoolean;
4040
import java.util.concurrent.atomic.AtomicReference;
4141
import java.util.function.BiConsumer;
42+
import java.util.stream.Stream;
4243

4344
import static io.vertx.core.http.HttpHeaders.ACCEPT_ENCODING;
4445
import static java.util.Comparator.reverseOrder;
@@ -684,7 +685,7 @@ public void testCustomDirectoryListingHtmlEscaping() throws Exception {
684685
"<a href=\"/\">..</a>",
685686
"<ul id=\"files\"><li><a href=\"/dirxss/%3Cimg%20src=x%20onerror=alert('XSS-FILE')%3E.txt\" title=\"&#60;img src=x onerror=alert(&#39;XSS-FILE&#39;)&#62;.txt\">&#60;img src=x onerror=alert(&#39;XSS-FILE&#39;)&#62;.txt</a></li></ul>");
686687
} finally {
687-
try (var pathStream = Files.walk(testDir.toPath())) {
688+
try (Stream<Path> pathStream = Files.walk(testDir.toPath())) {
688689
pathStream.sorted(reverseOrder()).map(Path::toFile).forEach(File::delete);
689690
}
690691
assertFalse(testDir.exists());

0 commit comments

Comments
 (0)