Fix dynamic registration of libraries
Bouncy Castle was not properly registering after downloading because
LibraryDownloader was attempting to add a single Path. Since Path
is Iterable, the overload never worked. Switching all instances of
loadJARs() to use Arrays.asList() explicitly resolves this problem.
This appears to have been introduced by the refactor in I4c9902f13e.
Change-Id: Ic773ff01914ce806e3ff6961179e191c2d32a729
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java b/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java
index 9a30696..9bc2ea5 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java
@@ -26,6 +26,7 @@
import java.net.URLClassLoader;
import java.nio.file.Path;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Set;
public final class IoUtil {
@@ -86,8 +87,8 @@
}
}
- public static void loadJARs(Path... jars) {
- loadJARs(Arrays.asList(jars));
+ public static void loadJARs(Path jar) {
+ loadJARs(Collections.singleton(jar));
}
private static UnsupportedOperationException noAddURL(String m, Throwable why) {