Fixed bug in generating code for rpc statement. (Bug 107)
authorMartin Vitez <mvitez@cisco.com>
Mon, 7 Oct 2013 15:56:11 +0000 (17:56 +0200)
committerMartin Vitez <mvitez@cisco.com>
Mon, 7 Oct 2013 15:56:11 +0000 (17:56 +0200)
Signed-off-by: Martin Vitez <mvitez@cisco.com>
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/BindingGeneratorImpl.xtend

index 0fefb1c0a4959df1b80489a52c94910a12a1c16d..742a19bbd6eabf227ce5f7300cfc3d8899ab5501 100644 (file)
@@ -540,6 +540,14 @@ public class BindingGeneratorImpl implements BindingGenerator {
                             }\r
                         }\r
                     }\r
+                    val List<ChoiceNode> nChoices = iter.allChoices();\r
+                    if((nChoices !== null) && !nChoices.isEmpty()) {\r
+                        for (choice : nChoices) {\r
+                            if(!choice.isAddedByUses()) {\r
+                                genRPCTypes.addAll(choiceToGeneratedType(basePackageName, choice));\r
+                            }\r
+                        }\r
+                    }\r
                 }\r
             }\r
         }\r