From 54f888c8184970cd46819afe8aa27f52ff51be4b Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 10 Aug 2020 10:40:02 -0500 Subject: [PATCH] Issue #5129 - testExtraClasspathGlob to use source reference Signed-off-by: Joakim Erdfelt --- .../jetty/webapp/WebAppContextExtraClasspathTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebAppContextExtraClasspathTest.java b/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebAppContextExtraClasspathTest.java index 781bc4780714..37e139d70983 100644 --- a/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebAppContextExtraClasspathTest.java +++ b/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebAppContextExtraClasspathTest.java @@ -118,10 +118,7 @@ public void testExtraClasspathGlob(String extraClasspathGlobReference) throws Ex context.setContextPath("/"); Path warPath = MavenTestingUtils.getTestResourcePathFile("wars/dump.war"); context.setBaseResource(new PathResource(warPath)); - Path extLibsDir = MavenTestingUtils.getTestResourcePathDir("ext"); - extLibsDir = extLibsDir.toAbsolutePath(); - String extLibsDirGlob = extLibsDir.toString() + File.separator + "*"; - context.setExtraClasspath(extLibsDirGlob); + context.setExtraClasspath(extraClasspathGlobReference); server.setHandler(context); server.start(); @@ -133,6 +130,8 @@ public void testExtraClasspathGlob(String extraClasspathGlobReference) throws Ex ClassLoader contextClassLoader = context.getClassLoader(); assertThat(contextClassLoader, instanceOf(WebAppClassLoader.class)); WebAppClassLoader webAppClassLoader = (WebAppClassLoader)contextClassLoader; + Path extLibsDir = MavenTestingUtils.getTestResourcePathDir("ext"); + extLibsDir = extLibsDir.toAbsolutePath(); List expectedPaths = Files.list(extLibsDir) .filter((path) -> path.toString().endsWith(".jar")) .collect(Collectors.toList());