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