Merge "Bug 735 - Part 1 - add ietf-restconf.yang back into yang-tools."
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / builder / impl / ImmutableChoiceNodeBuilder.java
index 674ebbaddc048dca748799494db70744545f57fa..36719534d5c1f666e80c46a1b5b3e8b98973a7b6 100644 (file)
@@ -21,18 +21,18 @@ public class ImmutableChoiceNodeBuilder extends AbstractImmutableDataContainerNo
         return new ImmutableChoiceNodeBuilder();
     }
 
+    @Override
     public ChoiceNode build() {
-        return new ImmutableChoiceNode(nodeIdentifier, value);
+        return new ImmutableChoiceNode(getNodeIdentifier(), buildValue());
     }
 
-    static final class ImmutableChoiceNode
+    private static final class ImmutableChoiceNode
             extends AbstractImmutableDataContainerNode<InstanceIdentifier.NodeIdentifier>
             implements ChoiceNode {
 
-        ImmutableChoiceNode(InstanceIdentifier.NodeIdentifier nodeIdentifier,
-                            Map<InstanceIdentifier.PathArgument, DataContainerChild<? extends InstanceIdentifier.PathArgument, ?>> children) {
+        ImmutableChoiceNode(final InstanceIdentifier.NodeIdentifier nodeIdentifier,
+                            final Map<InstanceIdentifier.PathArgument, DataContainerChild<? extends InstanceIdentifier.PathArgument, ?>> children) {
             super(children, nodeIdentifier);
         }
-
     }
 }