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