Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / type / Decimal64SpecificationEffectiveStatementImpl.java
index a762abd8f494934c3f5680b807c26ce06e312161..5a879baf58d98bcea47813c58dd72a04a09d75be 100644 (file)
@@ -12,6 +12,7 @@ import com.google.common.collect.ImmutableList;
 import java.math.BigDecimal;
 import java.util.Collections;
 import java.util.List;
+import java.util.Objects;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.YangConstants;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@@ -187,8 +188,8 @@ public class Decimal64SpecificationEffectiveStatementImpl 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;
     }