Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / ListSchemaNodeImpl.java
index a7a9c426c827680ef8bb3a650c914fb35f03417b..79ebe11b7e62a921d56de542dddc707f22b47aa6 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.base.Optional;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
@@ -101,8 +102,8 @@ final class ListSchemaNodeImpl extends AbstractDocumentedDataNodeContainer imple
     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 + Objects.hashCode(qname);
+        result = prime * result + Objects.hashCode(path);
         return result;
     }
 
@@ -139,4 +140,4 @@ final class ListSchemaNodeImpl extends AbstractDocumentedDataNodeContainer imple
     public String toString() {
         return "list " + qname.getLocalName();
     }
-}
\ No newline at end of file
+}