Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / UnknownSchemaNodeImpl.java
index 89c1a86f4ffabfcb055c5bea3a6c92573ffeb422..4b5f55427494df0de2f1957a8ed565c5e444dfa3 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.yangtools.yang.parser.builder.impl;
 
 import com.google.common.collect.ImmutableList;
 import java.util.List;
+import java.util.Objects;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.ExtensionDefinition;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@@ -115,10 +116,10 @@ final class UnknownSchemaNodeImpl implements UnknownSchemaNode {
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + ((qname == null) ? 0 : qname.hashCode());
-        result = prime * result + ((path == null) ? 0 : path.hashCode());
-        result = prime * result + ((nodeType == null) ? 0 : nodeType.hashCode());
-        result = prime * result + ((nodeParameter == null) ? 0 : nodeParameter.hashCode());
+        result = prime * result + Objects.hashCode(qname);
+        result = prime * result + Objects.hashCode(path);
+        result = prime * result + Objects.hashCode(nodeType);
+        result = prime * result + Objects.hashCode(nodeParameter);
         return result;
     }
 
@@ -165,4 +166,4 @@ final class UnknownSchemaNodeImpl implements UnknownSchemaNode {
         return true;
     }
 
-}
\ No newline at end of file
+}