File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
testing-common/integration-tests/src/test/java/instrumentation Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,14 @@ void classPathSetUp() throws ClassNotFoundException {
5050 for (ClassPath .ClassInfo info : getTestClasspath ().getAllClasses ()) {
5151 for (String bootstrapPrefix : BOOTSTRAP_PACKAGE_PREFIXES ) {
5252 if (info .getName ().startsWith (bootstrapPrefix )) {
53- Class <?> bootstrapClass = Class .forName (info .getName ());
54- ClassLoader loader = bootstrapClass .getClassLoader ();
55- if (loader != BOOTSTRAP_CLASSLOADER ) {
56- bootstrapClassesIncorrectlyLoaded .add (bootstrapClass );
53+ try {
54+ Class <?> bootstrapClass = Class .forName (info .getName ());
55+ ClassLoader loader = bootstrapClass .getClassLoader ();
56+ if (loader != BOOTSTRAP_CLASSLOADER ) {
57+ bootstrapClassesIncorrectlyLoaded .add (bootstrapClass );
58+ }
59+ } catch (ClassNotFoundException e ) {
60+ throw new RuntimeException ("Failed to load bootstrap class: " + info .getName () + " in " + bootstrapPrefix , e );
5761 }
5862 }
5963 }
You can’t perform that action at this time.
0 commit comments