Remove Hamcrest support from CompileWithTargetClassAccessClassLoader
CompileWithTargetClassAccessClassLoader is currently only used within the CompileWithTargetClassAccessExtension which is dedicated to JUnit Jupiter support which in turn should not have any direct dependencies on Hamcrest. In other words, the JupiterTestEngine should not load any Hamcrest types that would cause issues with the CompileWithTargetClassAccessClassLoader.
This commit is contained in:
parent
d9bf3e54f7
commit
42ea09b08a
|
|
@ -41,7 +41,7 @@ final class CompileWithTargetClassAccessClassLoader extends ClassLoader {
|
|||
|
||||
@Override
|
||||
public Class<?> loadClass(String name) throws ClassNotFoundException {
|
||||
if (name.startsWith("org.junit") || name.startsWith("org.hamcrest")) {
|
||||
if (name.startsWith("org.junit")) {
|
||||
return Class.forName(name, false, this.testClassLoader);
|
||||
}
|
||||
return super.loadClass(name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue