Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / UsesEffectiveStatementImpl.java
index 9403ca1e6babde17dc2ca90263237b5672e8f6c3..6c41847481506a6149b7ac9735cbe972ba206042 100644 (file)
@@ -16,6 +16,7 @@ import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
@@ -127,8 +128,8 @@ public class UsesEffectiveStatementImpl extends EffectiveStatementBase<QName, Us
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + ((groupingPath == null) ? 0 : groupingPath.hashCode());
-        result = prime * result + ((augmentations == null) ? 0 : augmentations.hashCode());
+        result = prime * result + Objects.hashCode(groupingPath);
+        result = prime * result + Objects.hashCode(augmentations);
         return result;
     }
 
@@ -169,4 +170,4 @@ public class UsesEffectiveStatementImpl extends EffectiveStatementBase<QName, Us
         sb.append("]");
         return sb.toString();
     }
-}
\ No newline at end of file
+}