From 085b6e0c317cb5b9fc26abb308829d508973d051 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 5 Jun 2014 13:24:31 +0200 Subject: [PATCH] BUG-868: use a single version of ClassLoaderUtils This removes the static import, which hid the fact we are using two different ClassLoaderUtils (both deprecated). Change-Id: If37786d591a4c9975d2d10539c70f888dd7d6c5c Signed-off-by: Robert Varga --- .../binding/codegen/impl/RuntimeCodeGenerator.xtend | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend index 4fb95d99b6..eea9ad6b89 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/RuntimeCodeGenerator.xtend @@ -16,7 +16,7 @@ import javassist.LoaderClassPath import org.opendaylight.controller.sal.binding.codegen.RuntimeCodeHelper import org.opendaylight.controller.sal.binding.spi.NotificationInvokerFactory import org.opendaylight.controller.sal.binding.spi.NotificationInvokerFactory.NotificationInvoker -import org.opendaylight.yangtools.sal.binding.generator.util.ClassLoaderUtils +import org.opendaylight.yangtools.yang.binding.util.ClassLoaderUtils import org.opendaylight.yangtools.sal.binding.generator.util.JavassistUtils import org.opendaylight.yangtools.yang.binding.BaseIdentity import org.opendaylight.yangtools.yang.binding.DataContainer @@ -28,8 +28,6 @@ import org.opendaylight.yangtools.yang.binding.RpcService import org.opendaylight.yangtools.yang.binding.annotations.QName import org.opendaylight.yangtools.yang.binding.annotations.RoutingContext -import static org.opendaylight.yangtools.concepts.util.ClassLoaderUtils.* - import static extension org.opendaylight.controller.sal.binding.codegen.RuntimeCodeSpecification.* import static extension org.opendaylight.controller.sal.binding.codegen.YangtoolsMappingHelper.* @@ -48,7 +46,7 @@ class RuntimeCodeGenerator implements org.opendaylight.controller.sal.binding.co } override getDirectProxyFor(Class iface) { - val T instance = withClassLoaderAndLock(iface.classLoader,lock) [| + val T instance = ClassLoaderUtils.withClassLoaderAndLock(iface.classLoader,lock) [| val proxyName = iface.directProxyName; val potentialClass = ClassLoaderUtils.tryToLoadClassWithTCCL(proxyName) if(potentialClass != null) { @@ -83,12 +81,12 @@ class RuntimeCodeGenerator implements org.opendaylight.controller.sal.binding.co } override getRouterFor(Class iface,String routerInstanceName) { - val metadata = withClassLoader(iface.classLoader) [| + val metadata = ClassLoaderUtils.withClassLoader(iface.classLoader) [| val supertype = iface.asCtClass return supertype.rpcMetadata; ] - val instance = withClassLoaderAndLock(iface.classLoader,lock) [ | + val instance = ClassLoaderUtils.withClassLoaderAndLock(iface.classLoader,lock) [ | val supertype = iface.asCtClass val routerName = iface.routerName; val potentialClass = ClassLoaderUtils.tryToLoadClassWithTCCL(routerName) @@ -228,7 +226,7 @@ class RuntimeCodeGenerator implements org.opendaylight.controller.sal.binding.co protected def resolveInvokerClass(Class class1) { - return withClassLoaderAndLock(class1.classLoader,lock) [| + return ClassLoaderUtils.withClassLoaderAndLock(class1.classLoader,lock) [| val invoker = invokerClasses.get(class1); if (invoker !== null) { return invoker; -- 2.36.6