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