BUG-6316: emit value unconditionally 58/42858/3
authorRobert Varga <rovarga@cisco.com>
Sun, 31 Jul 2016 15:21:55 +0000 (17:21 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 3 Aug 2016 08:33:35 +0000 (08:33 +0000)
In the effective model of the world, value is always present.
This is a follow-up fix for the API change introduced in
yangtools.

Change-Id: I3fae5d57fce868e03fd36a7d521f87a83205bcce
Signed-off-by: Robert Varga <rovarga@cisco.com>
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/YangTemplate.xtend

index 3902ab82a98c8b1f774e13b5a957966c246f7e8c..0814a898abb5185897f90fb4e37819741eb759f6 100644 (file)
@@ -99,12 +99,10 @@ class YangTemplate {
     }
 
     def private static writeEnumPair(EnumPair pair) {
-        var boolean hasEnumPairValue = pair.value != null
         '''
-            enum «pair.name»«IF !hasEnumPairValue»;«ELSE»{
+            enum «pair.name» {
                 value «pair.value»;
             }
-            «ENDIF»
         '''
     }