import java.util.Optional;
import java.util.ServiceLoader;
import java.util.concurrent.Executors;
-import javassist.ClassPool;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
import org.opendaylight.mdsal.binding.dom.adapter.BindingDOMNotificationPublishServiceAdapter;
import org.opendaylight.mdsal.binding.dom.adapter.BindingDOMNotificationServiceAdapter;
import org.opendaylight.mdsal.binding.dom.adapter.BindingToNormalizedNodeCodec;
-import org.opendaylight.mdsal.binding.dom.codec.gen.impl.StreamWriterGenerator;
import org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry;
import org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy;
import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
-import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.mdsal.dom.api.DOMDataBroker;
import org.opendaylight.mdsal.dom.api.DOMSchemaService;
return store;
}
- private final class SchemaContextHolder implements DOMSchemaService, SchemaContextProvider {
+ private static final class SchemaContextHolder implements DOMSchemaService, SchemaContextProvider {
private final SchemaContext schemaContext;
private final ListenerRegistry<SchemaContextListener> listeners;
*/
private SchemaContext getSchemaContext(List<YangModuleInfo> moduleInfos) {
this.moduleInfoBackedCntxt.addModuleInfos(moduleInfos);
- Optional<SchemaContext> tryToCreateSchemaContext =
- this.moduleInfoBackedCntxt.tryToCreateSchemaContext();
+ Optional<? extends SchemaContext> tryToCreateSchemaContext =
+ this.moduleInfoBackedCntxt.tryToCreateSchemaContext();
if (!tryToCreateSchemaContext.isPresent()) {
LOG.error("Could not create the initial schema context. Schema context is empty");
throw new IllegalStateException();
BindingRuntimeContext bindingContext =
BindingRuntimeContext.create(this.moduleInfoBackedCntxt, this.schemaContext);
BindingNormalizedNodeCodecRegistry bindingNormalizedNodeCodecRegistry =
- new BindingNormalizedNodeCodecRegistry(
- StreamWriterGenerator.create(JavassistUtils.forClassPool(ClassPool.getDefault())));
- bindingNormalizedNodeCodecRegistry.onBindingRuntimeContextUpdated(bindingContext);
+ new BindingNormalizedNodeCodecRegistry(bindingContext);
return bindingNormalizedNodeCodecRegistry;
}