Merge changes Ic8e48ed1,Ie6bc9bbf,I3e94c637,I84c8ac42
authorTony Tkacik <ttkacik@cisco.com>
Tue, 18 Nov 2014 08:34:47 +0000 (08:34 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 18 Nov 2014 08:34:47 +0000 (08:34 +0000)
* changes:
  BUG-2390: Use child size hints
  BUG-2390: Lower HashMap allocation defaults
  BUG-2384: improve ImmutableUnkeyedListNode efficiency
  BUG-2377: introduce internal UnmodifiableChildrenMap

yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableLeafSetEntryNodeBuilder.java

index 219f58c522165d174f7dc662f3fcc5371939cdf6..40c7a654d3fd8f33f5000ea24dd8839bffb64d7a 100644 (file)
@@ -7,15 +7,14 @@
  */
 package org.opendaylight.yangtools.yang.data.impl.schema.builder.impl;
 
+import com.google.common.base.Preconditions;
 import java.util.Map;
-
+import java.util.Objects;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
 import org.opendaylight.yangtools.yang.data.impl.schema.nodes.AbstractImmutableNormalizedValueAttrNode;
 
-import com.google.common.base.Preconditions;
-
 public class ImmutableLeafSetEntryNodeBuilder<T> extends AbstractImmutableNormalizedNodeBuilder<YangInstanceIdentifier.NodeWithValue, T, LeafSetEntryNode<T>> {
 
     public static <T> ImmutableLeafSetEntryNodeBuilder<T> create() {
@@ -31,7 +30,7 @@ public class ImmutableLeafSetEntryNodeBuilder<T> extends AbstractImmutableNormal
 
         ImmutableLeafSetEntryNode(final YangInstanceIdentifier.NodeWithValue nodeIdentifier, final T value, final Map<QName, String> attributes) {
             super(nodeIdentifier, value, attributes);
-            Preconditions.checkArgument(nodeIdentifier.getValue().equals(value),
+            Preconditions.checkArgument(Objects.deepEquals(nodeIdentifier.getValue(), value),
                     "Node identifier contains different value: %s than value itself: %s", nodeIdentifier, value);
         }
     }