Merge "Added XmlTreeBuilder into yang-data-impl"
[yangtools.git] / code-generator / binding-generator-impl / src / main / java / org / opendaylight / yangtools / sal / binding / generator / impl / BindingGeneratorImpl.xtend
index 364785dede5fbf0a198a59dce14754f6517d912d..8bc95f38a5ef49a40d65580855dee7f90ea0d46c 100644 (file)
@@ -1358,7 +1358,7 @@ public class BindingGeneratorImpl implements BindingGenerator {
                                var Type returnType = null;
                                if (typeDef instanceof EnumTypeDefinition) {
                                        returnType = typeProvider.javaTypeForSchemaDefinitionType(typeDef, leaf);
-                                       val enumTypeDef = enumTypeDefFromExtendedType(typeDef);
+                                       val enumTypeDef = typeDef as EnumTypeDefinition;
                                        val enumBuilder = resolveInnerEnumFromTypeDefinition(enumTypeDef, leafName, typeBuilder);
 
                                        if (enumBuilder !== null) {
@@ -1875,7 +1875,7 @@ public class BindingGeneratorImpl implements BindingGenerator {
                if (typeDef instanceof UnionTypeDefinition) {
                        genTOBuilders.addAll(
                                (typeProvider as TypeProviderImpl).
-                                       provideGeneratedTOBuildersForUnionTypeDef(packageName, typeDef, classNameFromLeaf, leaf));
+                                       provideGeneratedTOBuildersForUnionTypeDef(packageName, (typeDef as UnionTypeDefinition), classNameFromLeaf, leaf));
                } else if (typeDef instanceof BitsTypeDefinition) {
                        genTOBuilders.add(
                                ((typeProvider as TypeProviderImpl) ).