Fix a few sonar warnings
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / ChoiceBuilder.java
index 0b125f1f81de5411fdd1726dbb09f039c6e9f0c8..52f6e24c3126b391b1d748338ae076f427fc5df8 100644 (file)
@@ -33,7 +33,7 @@ import org.opendaylight.yangtools.yang.parser.util.YangParseException;
 
 public final class ChoiceBuilder extends AbstractSchemaNodeBuilder implements DataSchemaNodeBuilder,
 AugmentationTargetBuilder {
-    private ChoiceNodeImpl instance;
+    private ChoiceSchemaNodeImpl instance;
 
     // DataSchemaNode args
     private boolean augmenting;
@@ -88,7 +88,7 @@ AugmentationTargetBuilder {
             return instance;
         }
 
-        instance = new ChoiceNodeImpl(qname, schemaPath);
+        instance = new ChoiceSchemaNodeImpl(qname, schemaPath);
 
         instance.description = description;
         instance.reference = reference;
@@ -97,7 +97,7 @@ AugmentationTargetBuilder {
         instance.addedByUses = addedByUses;
         instance.configuration = configuration;
 
-        instance.constraints = constraints.toInstance();
+        instance.constraints = constraints.build();
         instance.defaultCase = defaultCase;
 
         // ORIGINAL NODE