Skip to content

Commit 31ff0da

Browse files
author
joeretro
committed
Removed classloader pointlessness
1 parent 685e7e1 commit 31ff0da

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/unit-test/org/hamcrest/generator/config/XmlConfiguratorTest.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@
1818
public class XmlConfiguratorTest extends TestCase {
1919

2020
private MockSugarConfiguration sugarConfiguration;
21-
private StubClassLoader classLoader;
2221
private XmlConfigurator config;
2322

2423
protected void setUp() throws Exception {
2524
super.setUp();
2625
sugarConfiguration = new MockSugarConfiguration();
27-
classLoader = new StubClassLoader();
28-
config = new XmlConfigurator(sugarConfiguration, classLoader);
26+
config = new XmlConfigurator(sugarConfiguration, getClass().getClassLoader());
2927
}
3028

3129
public void testAddsMatcherFactoryMethodsToConfiguration() throws Exception {
@@ -96,10 +94,4 @@ public List<FactoryMethod> factoryMethods() {
9694
}
9795
}
9896

99-
private static class StubClassLoader extends ClassLoader {
100-
public Class<?> loadClass(String name) throws ClassNotFoundException {
101-
return super.loadClass(name);
102-
}
103-
}
104-
10597
}

0 commit comments

Comments
 (0)