Merge pull request #11511 from jetty/fix/12.0.x/classmatcher-match-npe
Issue #11510 - Prevent NPE in ClassMatcher.match()
This commit is contained in:
commit
d07d13f30a
|
@ -751,6 +751,9 @@ public class ClassMatcher extends AbstractSet<String>
|
|||
|
||||
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);
|
||||
|
|
|
@ -733,6 +733,9 @@ public class ClassMatcher extends AbstractSet<String>
|
|||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue