summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-03-07 18:05:43 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-03-07 17:08:35 +0000
commit9297f70f8a75fae4c3b5ad8fe7324a5420895352 (patch)
treea5a63c1477dc81807318c609c147614d6f6588f7
parentec78f178f542369fdfd696fdc6e4bb872780ac87 (diff)
Use StreamWriterGenerator.create instead of deprecated constructor
Change-Id: Ief2224325fb7b9ec1dd3bbb21536f6306b68aa1a Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
-rw-r--r--infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java5
2 files changed, 5 insertions, 4 deletions
diff --git a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java
index e2a74ab69..f4e6f0e98 100644
--- a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java
+++ b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java
@@ -58,8 +58,8 @@ abstract class AbstractInfraTest {
static BindingToNormalizedNodeCodec getSerializer(final ModuleInfoBackedContext moduleInfoBackedContext,
final SchemaContext schemaContext) {
- final DataObjectSerializerGenerator serializerGenerator = new StreamWriterGenerator(JavassistUtils.forClassPool(
- ClassPool.getDefault()));
+ final DataObjectSerializerGenerator serializerGenerator =
+ StreamWriterGenerator.create(JavassistUtils.forClassPool(ClassPool.getDefault()));
final BindingNormalizedNodeCodecRegistry codecRegistry = new BindingNormalizedNodeCodecRegistry(serializerGenerator);
final BindingRuntimeContext ctx =
BindingRuntimeContext.create(moduleInfoBackedContext, schemaContext);
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java
index e61b88432..2a1963c0a 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/SerializerProvider.java
@@ -20,6 +20,7 @@ import com.google.inject.Inject;
import io.fd.honeycomb.infra.distro.ProviderTrait;
import javassist.ClassPool;
import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
+import org.opendaylight.yangtools.binding.data.codec.gen.impl.DataObjectSerializerGenerator;
import org.opendaylight.yangtools.binding.data.codec.gen.impl.StreamWriterGenerator;
import org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry;
import org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext;
@@ -33,8 +34,8 @@ public class SerializerProvider extends ProviderTrait<BindingToNormalizedNodeCod
@Override
protected BindingToNormalizedNodeCodec create() {
- StreamWriterGenerator serializerGenerator =
- new StreamWriterGenerator(JavassistUtils.forClassPool(ClassPool.getDefault()));
+ final DataObjectSerializerGenerator serializerGenerator =
+ StreamWriterGenerator.create(JavassistUtils.forClassPool(ClassPool.getDefault()));
BindingNormalizedNodeCodecRegistry codecRegistry = new BindingNormalizedNodeCodecRegistry(serializerGenerator);
BindingRuntimeContext ctx = BindingRuntimeContext.create(mibCtx, mibCtx.getSchemaContext());
codecRegistry.onBindingRuntimeContextUpdated(ctx);