summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/main/java/com/yahoo/system
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2016-06-17 16:07:28 +0200
committerArne Juul <arnej@yahoo-inc.com>2016-06-17 16:07:28 +0200
commit6713ae38ee570110602ebeb21f58af50a72e9d69 (patch)
tree6f5867adede1ed510edde31b57bf1f7ea79c392b /vespajlib/src/main/java/com/yahoo/system
parent77eb221fff4ab953b8288662bc140d56ad56275c (diff)
ForceLoad API needs the classloader also
* since bundles may be loaded by a different classloader we'll need to provide the correct one in order to find the class defs.
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/system')
-rw-r--r--vespajlib/src/main/java/com/yahoo/system/ForceLoad.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/system/ForceLoad.java b/vespajlib/src/main/java/com/yahoo/system/ForceLoad.java
index f924740321f..4946f3b8033 100644
--- a/vespajlib/src/main/java/com/yahoo/system/ForceLoad.java
+++ b/vespajlib/src/main/java/com/yahoo/system/ForceLoad.java
@@ -15,14 +15,14 @@ public class ForceLoad {
* @param classNames array of names of classes (without package prefix)
* to force load.
**/
- public static void forceLoad(String packageName, String[] classNames)
+ public static void forceLoad(String packageName, String[] classNames, ClassLoader loader)
throws ForceLoadError
{
String fullClassName = "";
try {
for (String className : classNames) {
fullClassName = packageName + "." + className;
- Class.forName(fullClassName);
+ loader.loadClass(fullClassName);
}
} catch (Exception e) {
throw new ForceLoadError(fullClassName, e);