File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
spring-test/src/main/java/org/springframework/test/context Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -170,13 +170,13 @@ static Class<? extends ContextLoader> resolveContextLoaderClass(Class<?> testCla
170
170
logger .trace (String .format ("Using default ContextLoader class [%s] for test class [%s]" ,
171
171
defaultContextLoaderClassName , testClass .getName ()));
172
172
}
173
- return (Class <? extends ContextLoader >) ContextLoaderUtils . class . getClassLoader (). loadClass (
174
- defaultContextLoaderClassName );
173
+ return (Class <? extends ContextLoader >) ClassUtils . forName ( defaultContextLoaderClassName ,
174
+ ContextLoaderUtils . class . getClassLoader () );
175
175
}
176
- catch (ClassNotFoundException ex ) {
176
+ catch (Throwable t ) {
177
177
throw new IllegalStateException ("Could not load default ContextLoader class ["
178
178
+ defaultContextLoaderClassName + "]. Specify @ContextConfiguration's 'loader' "
179
- + "attribute or make the default loader class available." );
179
+ + "attribute or make the default loader class available." , t );
180
180
}
181
181
}
182
182
You can’t perform that action at this time.
0 commit comments