diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-01-04 07:08:34 +0100 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-03-23 06:54:25 +0100 |
commit | 8acc5613345d9c50d0f33c3d74ae64e474b80724 (patch) | |
tree | 130723e4f6e4daa2fcc57538d971dfd34886c8a8 /infra/translate-utils | |
parent | bc559d4e6ccbdbaf65e612e56b2fe5d0614ff623 (diff) |
HONEYCOMB-424: bump ODL dependencies to Oxygen
Change-Id: I3160e5df4e66b3b3c732619fc1fc7599459fda76
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/translate-utils')
-rw-r--r-- | infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/JsonUtils.java | 5 | ||||
-rw-r--r-- | infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/JsonUtils.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/JsonUtils.java index 324efc24c..2f488f443 100644 --- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/JsonUtils.java +++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/JsonUtils.java @@ -32,7 +32,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter; import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter; -import org.opendaylight.yangtools.yang.data.codec.gson.JSONCodecFactory; +import org.opendaylight.yangtools.yang.data.codec.gson.JSONCodecFactorySupplier; import org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter; import org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream; import org.opendaylight.yangtools.yang.data.codec.gson.JsonWriterFactory; @@ -62,7 +62,8 @@ public final class JsonUtils { final JsonWriter jsonWriter = createJsonWriter(outputStream, true); final NormalizedNodeStreamWriter streamWriter = JSONNormalizedNodeStreamWriter - .createNestedWriter(JSONCodecFactory.create(schemaContext), SchemaPath.ROOT, null, jsonWriter); + .createNestedWriter(JSONCodecFactorySupplier.DRAFT_LHOTKA_NETMOD_YANG_JSON_02.getShared(schemaContext), + SchemaPath.ROOT, null, jsonWriter); final NormalizedNodeWriter normalizedNodeWriter = NormalizedNodeWriter.forStreamWriter(streamWriter, true); jsonWriter.beginObject(); diff --git a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java index 70717d2e8..a89760c9a 100644 --- a/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java +++ b/infra/translate-utils/src/test/java/io/fd/honeycomb/translate/util/JsonUtilsTest.java @@ -52,7 +52,7 @@ public class JsonUtilsTest { public void setUp() throws Exception { MockitoAnnotations.initMocks(this); tmpPersistFile = Files.createTempFile("testing-hc-persistence", "json"); - schemaContext = YangParserTestUtils.parseYangSources(Collections.singletonList("/test-persistence.yang")); + schemaContext = YangParserTestUtils.parseYangResource("/test-persistence.yang"); } @Test |