new Class[] { Class.class });
if (useNullLoader[i]) {
testCl = null;
} else {
testCl = new FakeClassLoader(jarFile.toURI().toURL());
}
try {
callVerifyCodebaseIntegrity(wrongUrls[j], testCl);
// FAIL
throw new TestException(
"Method did not throw any exception while "
+ "MalformedURLException was expected.");
} catch (MalformedURLException mue) {
// PASS
logger.fine("MalformedURLException was thrown "
+ "as expected.");
} finally {
jarFile.delete();
}
}
logger.fine("=========== Check correct URLs ===========");
for (int j = 0; j < clNames.length; ++j) {
logger.fine("========== Iteration #" + (j + 1)
+ " ==========");
logger.fine("Test integrity verifiers are: "
+ Util.arrayToString(clNames[j]));
for (int k = 0; k < testUrls.length; ++k) {
BaseIntegrityVerifier.initLists();
jarFile = Util.createResourceJar(resName, clNames[j]);
expRes = getExpRes(clNames[j], testUrls[k]);
if (useNullLoader[i]) {
testCl = null;
} else {
testCl = new FakeClassLoader(jarFile.toURI().toURL());
}
Thread.currentThread().setContextClassLoader(
new FakeClassLoader(jarFile.toURI().toURL()));
try {
callVerifyCodebaseIntegrity(testUrls[k], testCl);
if (expRes != null) {