Fix somar complaints in equals methods
[yangtools.git] / yang / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / OidEffectiveStatementImpl.java
index 5b71dea02187db1e1b76f3942d14c9ff53e99262..05588f8766c6fd60e5ef6e88eeb67d0d10959f13 100644 (file)
@@ -57,22 +57,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