use of CustomCLs.CustomURLClassLoader in project openj9 by eclipse.
the class Verifier method executeTest.
public boolean executeTest(String classpath, String[] classesToVerify, String[] results) {
System.out.println("\nCreating Verifier.....");
URLClassPathCreator vfPathCreator = new URLClassPathCreator(classpath);
URL[] vfPath;
vfPath = vfPathCreator.createURLClassPath();
CustomURLClassLoader verifier = new CustomURLClassLoader(vfPath, this.getClass().getClassLoader());
System.out.println("\nRunning Verifier.....");
boolean result = true;
for (int cIndex = 0; cIndex < classesToVerify.length; cIndex++) {
String className = classesToVerify[cIndex];
if (className != null) {
String expectedResult = results[cIndex];
String testResult = String.valueOf(verifier.isClassInSharedCache(className));
if (!(expectedResult.equals(testResult))) {
System.out.println("\nFailure testing class: " + className + " result: " + testResult + " expecting: " + expectedResult);
result = false;
}
}
}
return result;
}
Aggregations