From 57f935faed5be0985010f23da164de5a6d91ae0f Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 3 Mar 2022 11:01:48 +0000 Subject: [PATCH] Use a more relaxed AliasCheck for CI on Windows ContextHandler.ApproveAliases has been deprecated. We tried to replace it with AllowedResourceAliasChecker but it does not behave in the same way and causes CI failures on Windows. ContextHandler.ApproveAliases always returns true so we should hardcode our own implementation that does the same. Closes gh-30045 --- .../java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java index 48fc7a2a03..359b8ec26c 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java @@ -16,7 +16,6 @@ package smoketest.jetty.jsp; -import org.eclipse.jetty.server.AllowedResourceAliasChecker; import org.eclipse.jetty.server.handler.ContextHandler; import org.junit.jupiter.api.Test; @@ -60,7 +59,7 @@ class SampleWebJspApplicationTests { JettyServerCustomizer jettyServerCustomizer() { return (server) -> { ContextHandler handler = (ContextHandler) server.getHandler(); - handler.addAliasCheck(new AllowedResourceAliasChecker(handler)); + handler.addAliasCheck((path, resource) -> true); }; }