X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Ftest%2Futil%2FBindingBrokerTestFactory.java;h=e0a332f593f06d6d147cf6446e818f7e9f55e958;hp=e5b57e3668baadb6fbe942364bfb3d920f56772c;hb=3ec97cd0a86ad1b79f6854dc6924eb7b06e359a3;hpb=509a8a4d570abc3a9a496837617015b1084c2761 diff --git a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/util/BindingBrokerTestFactory.java b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/util/BindingBrokerTestFactory.java index e5b57e3668..e0a332f593 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/util/BindingBrokerTestFactory.java +++ b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/util/BindingBrokerTestFactory.java @@ -7,17 +7,18 @@ */ package org.opendaylight.controller.sal.binding.test.util; -import java.util.concurrent.ExecutorService; - -import javassist.ClassPool; - +import com.google.common.annotations.Beta; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; +import java.util.concurrent.ExecutorService; +import javassist.ClassPool; +@Beta +@Deprecated public class BindingBrokerTestFactory { - private static final ClassPool CLASS_POOL = new ClassPool(); + private static final ClassPool CLASS_POOL = ClassPool.getDefault(); private boolean startWithParsedSchema = true; private ExecutorService executor; private ClassPool classPool; @@ -27,7 +28,7 @@ public class BindingBrokerTestFactory { return startWithParsedSchema; } - public void setStartWithParsedSchema(boolean startWithParsedSchema) { + public void setStartWithParsedSchema(final boolean startWithParsedSchema) { this.startWithParsedSchema = startWithParsedSchema; } @@ -35,27 +36,27 @@ public class BindingBrokerTestFactory { return executor; } - public void setExecutor(ExecutorService executor) { + public void setExecutor(final ExecutorService executor) { this.executor = executor; } - public BindingTestContext getTestContext() { Preconditions.checkState(executor != null, "Executor is not set."); ListeningExecutorService listenableExecutor = MoreExecutors.listeningDecorator(executor); - return new BindingTestContext(listenableExecutor, getClassPool(),startWithParsedSchema); + return new BindingTestContext(listenableExecutor, startWithParsedSchema); } + @Deprecated public ClassPool getClassPool() { - if(classPool == null) { + if (classPool == null) { return CLASS_POOL; } return classPool; } - public void setClassPool(ClassPool classPool) { + @Deprecated + public void setClassPool(final ClassPool classPool) { this.classPool = classPool; } - }