Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / ChoiceSchemaNodeImpl.java
index 5c4d74020dc410072688a08011593deb07d81310..6a4a0a81d271d09f29d3a34b9573c129eac4eb49 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;
@@ -145,8 +146,8 @@ final class ChoiceSchemaNodeImpl implements ChoiceSchemaNode, DerivableSchemaNod
     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;
     }
 
@@ -188,4 +189,4 @@ final class ChoiceSchemaNodeImpl implements ChoiceSchemaNode, DerivableSchemaNod
         return sb.toString();
     }
 
-}
\ No newline at end of file
+}