Fix somar complaints in equals methods
[yangtools.git] / yang / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / ImpliedEffectiveStatementImpl.java
index b3dd587a9edbbac07e42fe0a1ba02741676916a7..ef59ce5483703a58e5cb8f2b631c2f5ee3361317 100644 (file)
@@ -56,22 +56,11 @@ final class ImpliedEffectiveStatementImpl extends UnknownEffectiveStatementBase<
         if (this == obj) {
             return true;
         }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
+        if (!(obj instanceof ImpliedEffectiveStatementImpl)) {
             return false;
         }
         final ImpliedEffectiveStatementImpl other = (ImpliedEffectiveStatementImpl) 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);
     }
 }