From: Igor Foltin Date: Mon, 15 Aug 2016 13:14:56 +0000 (+0200) Subject: Bug 6419: Fixed SchemaContextEmitter's emitContainer method X-Git-Tag: release/boron~8 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F44054%2F1;p=yangtools.git Bug 6419: Fixed SchemaContextEmitter's emitContainer method Method emitContainer now emits must statements only once through the method emitConstraints. Change-Id: Ib818d7dc25b07df3f35559166a0ef933d19808d0 Signed-off-by: Igor Foltin (cherry picked from commit a664580e83425f01943698e7ff52e48bd3411cfb) --- diff --git a/yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SchemaContextEmitter.java b/yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SchemaContextEmitter.java index 81ac9ba8d0..baa2dbddee 100644 --- a/yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SchemaContextEmitter.java +++ b/yang/yang-model-export/src/main/java/org/opendaylight/yangtools/yang/model/export/SchemaContextEmitter.java @@ -757,7 +757,6 @@ class SchemaContextEmitter { emitConstraints(child.getConstraints()); // FIXME: BUG-2444: whenNode //:Optional // FIXME: BUG-2444: *(ifFeatureNode ) - emitMustNodes(child.getConstraints().getMustConstraints()); emitPresenceNode(child.isPresenceContainer()); emitConfigNode(child.isConfiguration()); emitDocumentedNode(child); diff --git a/yang/yang-model-export/src/test/resources/schema-context-emitter-test/foo.xml b/yang/yang-model-export/src/test/resources/schema-context-emitter-test/foo.xml index 1bc428e57e..52ffe1a036 100644 --- a/yang/yang-model-export/src/test/resources/schema-context-emitter-test/foo.xml +++ b/yang/yang-model-export/src/test/resources/schema-context-emitter-test/foo.xml @@ -172,7 +172,6 @@ -