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
(cherry picked from commit 027764a06c
)
This commit is contained in:

committed by
Paladox none

parent
9fff29bdef
commit
e00456ca9e
@@ -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