Fixing bad Container Include Jar pattern.

+ It was matching on jetty-util-ajax-#.jar as well.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2020-11-02 12:33:12 -06:00
parent c9440357a7
commit fd974c474c
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
1 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ public class WebInfConfigurationTest
{
WebInfConfiguration config = new WebInfConfiguration();
WebAppContext context = new WebAppContext();
context.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/jetty-util-[^/]*\\.jar$|.*/jetty-util/target/classes/");
context.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/jetty-util-[0-9][^/]*\\.jar$|.*/jetty-util/target/classes/");
WebAppClassLoader loader = new WebAppClassLoader(context);
context.setClassLoader(loader);
@ -89,7 +89,7 @@ public class WebInfConfigurationTest
{
WebInfConfiguration config = new WebInfConfiguration();
WebAppContext context = new WebAppContext();
context.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/jetty-util-[^/]*\\.jar$|.*/jetty-util/target/classes/$|.*/foo-bar-janb.jar");
context.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/jetty-util-[0-9][^/]*\\.jar$|.*/jetty-util/target/classes/$|.*/foo-bar-janb.jar");
WebAppClassLoader loader = new WebAppClassLoader(context);
context.setClassLoader(loader);
config.findAndFilterContainerPaths(context);
@ -117,7 +117,7 @@ public class WebInfConfigurationTest
WebInfConfiguration config = new WebInfConfiguration();
WebAppContext context = new WebAppContext();
context.setAttribute(JavaVersion.JAVA_TARGET_PLATFORM, "8");
context.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/jetty-util-[^/]*\\.jar$|.*/jetty-util/target/classes/$|.*/foo-bar-janb.jar");
context.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/jetty-util-[0-9][^/]*\\.jar$|.*/jetty-util/target/classes/$|.*/foo-bar-janb.jar");
WebAppClassLoader loader = new WebAppClassLoader(context);
context.setClassLoader(loader);
config.findAndFilterContainerPaths(context);