Fix a few sonar warnings
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / nodes / AbstractImmutableNormalizedValueAttrNode.java
index 8f9e1019e5c118ce33efd08cf18dd9d9ac982a45..6fbcc6967257c1854cc0bf6937fe9cdb00dd12cf 100644 (file)
@@ -7,16 +7,15 @@
  */
 package org.opendaylight.yangtools.yang.data.impl.schema.nodes;
 
-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 java.util.Objects;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.AttributesContainer;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 
-public abstract class AbstractImmutableNormalizedValueAttrNode<K extends YangInstanceIdentifier.PathArgument,V>
+public abstract class AbstractImmutableNormalizedValueAttrNode<K extends PathArgument,V>
         extends AbstractImmutableNormalizedValueNode<K, V>
         implements AttributesContainer {
 
@@ -45,10 +44,7 @@ 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;
     }
 
@@ -57,16 +53,11 @@ public abstract class AbstractImmutableNormalizedValueAttrNode<K extends YangIns
         // 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())) {
+        if (!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);
         return true;
     }