Don't fail in loadJARs when there are no jar files to load
The loadJARs method throws an exception if the class loader which needs to be extended is not an URLClassLoader. However, there is no reason to fail when there are not jars to load. Change-Id: I263384af81e7af1e2e8d8e0a3aee428f029c9d35
This commit is contained in:
@@ -56,6 +56,10 @@ public final class IoUtil {
|
||||
}
|
||||
|
||||
public static void loadJARs(Collection<Path> jars) {
|
||||
if (jars.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
ClassLoader cl = IoUtil.class.getClassLoader();
|
||||
if (!(cl instanceof URLClassLoader)) {
|
||||
throw noAddURL("Not loaded by URLClassLoader", null);
|
||||
|
Reference in New Issue
Block a user