Fix somar complaints in equals methods
[yangtools.git] / yang / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / MaxAccessEffectiveStatementImpl.java
index 7007758ffe50ae262d1bd17d1057bb56d6236b8f..9a57de5129e809c7b2befc5875cca0bc9f598a58 100644 (file)
@@ -61,22 +61,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);
     }
 }