This commit is contained in:
Phillip Webb
2018-01-03 11:41:27 -08:00
parent 6bac365a72
commit bee5fa7fc6
24 changed files with 334 additions and 253 deletions

View File

@@ -44,15 +44,11 @@ public class FilteredClassLoaderTests {
@Test
public void loadClassWhenFilteredOnClassShouldThrowClassNotFound() throws Exception {
FilteredClassLoader classLoader = new FilteredClassLoader(
FilteredClassLoaderTests.class);
try {
try (FilteredClassLoader classLoader = new FilteredClassLoader(
FilteredClassLoaderTests.class)) {
this.thrown.expect(ClassNotFoundException.class);
classLoader.loadClass(getClass().getName());
}
finally {
classLoader.close();
}
}
@Test