Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / ChoiceEffectiveStatementImpl.java
index 8afc483aa3c2069b08dbdba0bc6e99627fc22b53..0be4b49db80041f5e7d488ab0fd99b77a4924410 100644 (file)
@@ -14,6 +14,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
@@ -251,8 +252,8 @@ public class ChoiceEffectiveStatementImpl extends
     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;
     }
 
@@ -295,4 +296,4 @@ public class ChoiceEffectiveStatementImpl extends
         return sb.toString();
     }
 
-}
\ No newline at end of file
+}