Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Fixed performance issues with implementation of BA-to-BI mapping"
[controller.git]
/
opendaylight
/
md-sal
/
sal-binding-broker
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
binding
/
impl
/
util
/
ClassLoaderUtils.java
diff --git
a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/util/ClassLoaderUtils.java
b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/util/ClassLoaderUtils.java
index ccf99dfe379681b85e613214bfe996d309a318ad..0b91658a187399758e5e8dac99f884749c0d048e 100644
(file)
--- a/
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/util/ClassLoaderUtils.java
+++ b/
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/util/ClassLoaderUtils.java
@@
-10,8
+10,6
@@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
-import org.opendaylight.yangtools.yang.binding.Identifier;
-
public class ClassLoaderUtils {
public static <V> V withClassLoader(ClassLoader cls,Callable<V> function) throws Exception {
public class ClassLoaderUtils {
public static <V> V withClassLoader(ClassLoader cls,Callable<V> function) throws Exception {
@@
-33,4
+31,9
@@
public class ClassLoaderUtils {
Object[] initargs = objects.toArray(new Object[]{});
return constructor.newInstance(initargs);
}
Object[] initargs = objects.toArray(new Object[]{});
return constructor.newInstance(initargs);
}
+
+
+ public static Class<?> loadClassWithTCCL(String name) throws ClassNotFoundException {
+ return Thread.currentThread().getContextClassLoader().loadClass(name);
+ }
}
\ No newline at end of file
}
\ No newline at end of file