Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / ChoiceCaseNodeImpl.java
index 7e1b519303668ec4b2311924c7ad57d372dddec8..ff96faf9bd40e135edf178caab27227b14a85591 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;
@@ -87,8 +88,8 @@ final class ChoiceCaseNodeImpl 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;
     }
 
@@ -131,4 +132,4 @@ final class ChoiceCaseNodeImpl extends AbstractDocumentedDataNodeContainer imple
         return sb.toString();
     }
 
-}
\ No newline at end of file
+}