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