Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / UsesNodeImpl.java
index 7100403525cf098aa633e807e770e14102d25289..4507c853e325eb145be8072e2abe22fc7f170051 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
@@ -67,8 +68,8 @@ final class UsesNodeImpl implements UsesNode {
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + ((groupingPath == null) ? 0 : groupingPath.hashCode());
-        result = prime * result + ((augmentations == null) ? 0 : augmentations.hashCode());
+        result = prime * result + Objects.hashCode(groupingPath);
+        result = prime * result + Objects.hashCode(augmentations);
         return result;
     }
 
@@ -109,4 +110,4 @@ final class UsesNodeImpl implements UsesNode {
         sb.append("]");
         return sb.toString();
     }
-}
\ No newline at end of file
+}