Fix somar complaints in equals methods
[yangtools.git] / yang / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / OidEffectiveStatementImpl.java
index ea14bcc008fbb69318cddc2c07215fcc9be358d3..f7504201703b68c1203f8cfaebd0416a0b9ef0e6 100644 (file)
@@ -58,22 +58,11 @@ final class OidEffectiveStatementImpl extends UnknownEffectiveStatementBase<Obje
         if (this == obj) {
             return true;
         }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
+        if (!(obj instanceof OidEffectiveStatementImpl)) {
             return false;
         }
         final OidEffectiveStatementImpl other = (OidEffectiveStatementImpl) obj;
-        if (!Objects.equals(path, other.path)) {
-            return false;
-        }
-        if (!Objects.equals(getNodeType(), other.getNodeType())) {
-            return false;
-        }
-        if (!Objects.equals(getNodeParameter(), other.getNodeParameter())) {
-            return false;
-        }
-        return true;
+        return Objects.equals(getNodeType(), other.getNodeType())
+            && Objects.equals(getNodeParameter(), other.getNodeParameter()) && Objects.equals(path, other.path);
     }
 }
\ No newline at end of file