Merge pull request #6524 from eclipse/jetty-10.0.x-classpathpatterntest-prepend-not-needed

Issue #6515 - Adding Test to ensure that ClasspathPattern doesn't need prepend anymore.
This commit is contained in:
Joakim Erdfelt 2021-07-27 07:41:35 -05:00 committed by GitHub
commit 5344717c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -121,6 +121,17 @@ public class ClassMatcherTest
assertTrue(_pattern.match("org.example.Anything$Else")); assertTrue(_pattern.match("org.example.Anything$Else"));
} }
@Test
public void testMatchFundamentalExcludeSpecific()
{
_pattern.clear();
_pattern.add("javax.");
_pattern.add("-javax.ws.rs.", "-javax.inject.");
assertFalse(_pattern.match("org.example.Anything"));
assertTrue(_pattern.match("javax.servlet.HttpServlet"));
assertFalse(_pattern.match("javax.ws.rs.ProcessingException"));
}
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
@Test @Test
public void testIncludedLocations() throws Exception public void testIncludedLocations() throws Exception