diff --git a/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/ClassMatcher.java b/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/ClassMatcher.java index f7334e8c337f..a79a8783fb9a 100644 --- a/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/ClassMatcher.java +++ b/jetty-ee10/jetty-ee10-webapp/src/main/java/org/eclipse/jetty/ee10/webapp/ClassMatcher.java @@ -751,6 +751,9 @@ public boolean match(Class clazz) public boolean match(String name, URL url) { + if (url == null) + return false; + // Strip class suffix for name matching if (name.endsWith(".class")) name = name.substring(0, name.length() - 6); diff --git a/jetty-ee9/jetty-ee9-webapp/src/main/java/org/eclipse/jetty/ee9/webapp/ClassMatcher.java b/jetty-ee9/jetty-ee9-webapp/src/main/java/org/eclipse/jetty/ee9/webapp/ClassMatcher.java index 148486e5ba42..84d05c2a9cf9 100644 --- a/jetty-ee9/jetty-ee9-webapp/src/main/java/org/eclipse/jetty/ee9/webapp/ClassMatcher.java +++ b/jetty-ee9/jetty-ee9-webapp/src/main/java/org/eclipse/jetty/ee9/webapp/ClassMatcher.java @@ -733,6 +733,9 @@ public boolean match(Class clazz) public boolean match(String name, URL url) { + if (url == null) + return false; + // Strip class suffix for name matching if (name.endsWith(".class")) name = name.substring(0, name.length() - 6);