Use Objects.hashCode()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / impl / LeafListSchemaNodeBuilder.java
index b0debdfb66f88a5d3bc3bcda0b54f7a89cc4c829..937054ef909df4a4cfe4a66ff369e6c29cbd0d4a 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.yangtools.yang.parser.builder.impl;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
+import java.util.Objects;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@@ -196,7 +197,7 @@ public final class LeafListSchemaNodeBuilder extends AbstractTypeAwareBuilder im
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-        result = prime * result + ((schemaPath == null) ? 0 : schemaPath.hashCode());
+        result = prime * result + Objects.hashCode(schemaPath);
         return result;
     }