Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / RpcDefinitionImpl.java
index 6ddde27ab74320ef6fffa163356cc9c2ce4985a1..fe19f9e0ee482dc32ff9273305ae3aa5fef06acd 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.yangtools.yang.parser.builder.impl;
 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.ContainerSchemaNode;
@@ -99,8 +100,8 @@ final class RpcDefinitionImpl implements RpcDefinition {
     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;
     }
 
@@ -148,4 +149,4 @@ final class RpcDefinitionImpl implements RpcDefinition {
         sb.append("]");
         return sb.toString();
     }
-}
\ No newline at end of file
+}