Cleanup some major sonar warning in yang/*
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / nodes / AbstractImmutableNormalizedValueAttrNode.java
index e90db03c6440ae77cee001360d6586335f0c2a2a..842cf231f7126290ee13ff4e3c5ddf4ee7baa4dd 100644 (file)
@@ -7,8 +7,7 @@
  */
 package org.opendaylight.yangtools.yang.data.impl.schema.nodes;
 
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
+import com.google.common.base.MoreObjects.ToStringHelper;
 import com.google.common.collect.ImmutableMap;
 import java.util.Map;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -44,26 +43,21 @@ public abstract class AbstractImmutableNormalizedValueAttrNode<K extends YangIns
     @Override
     protected int valueHashCode() {
         final int result = getValue() != null ? getValue().hashCode() : 1;
-// FIXME: are attributes part of hashCode/equals?
-//        for (final Entry<?, ?> a : attributes.entrySet()) {
-//            result = 31 * result + a.hashCode();
-//        }
+        // FIXME: are attributes part of hashCode/equals?
         return result;
     }
 
     @Override
     protected boolean valueEquals(final AbstractImmutableNormalizedNode<?, ?> other) {
-        // We can not call directly getValue.equals because of Empty Type Definition leaves
-        // which allways have NULL value
-        if (!Objects.equal(getValue(), other.getValue())) {
+        // We can not call directly getValue.equals because of Empty Type
+        // Definition leaves which allways have NULL value
+
+        if (!java.util.Objects.deepEquals(getValue(), other.getValue())) {
             return false;
         }
 
-// FIXME: are attributes part of hashCode/equals?
-//        final Set<Entry<QName, String>> tas = getAttributes().entrySet();
-//        final Set<Entry<QName, String>> oas = container.getAttributes().entrySet();
-//
-//        return tas.containsAll(oas) && oas.containsAll(tas);
+        // FIXME: are attributes part of hashCode/equals?
         return true;
     }
+
 }