Skip to content

Commit

Permalink
Fixing bad Container Include Jar pattern.
Browse files Browse the repository at this point in the history
+ It was matching on jetty-util-ajax-#.jar as well.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Nov 2, 2020
1 parent 2afbc5d commit 244b2b6
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -67,7 +67,7 @@ public void testFindAndFilterContainerPaths()
{
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);
Expand All @@ -89,7 +89,7 @@ public void testFindAndFilterContainerPathsJDK9()
{
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);
Expand Down Expand Up @@ -117,7 +117,7 @@ public void testFindAndFilterContainerPathsTarget8()
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);
Expand Down

0 comments on commit 244b2b6

Please sign in to comment.