Reduce sonar code smells
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / augment / AugmentEffectiveStatementImpl.java
index 661c46143b07a080825d4e778ad92d5cdadd24f3..cbb6a815cc78cc8c94e9ac21f94190c8b13ceeee 100644 (file)
@@ -133,23 +133,12 @@ final class AugmentEffectiveStatementImpl
         if (this == obj) {
             return true;
         }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
+        if (!(obj instanceof AugmentEffectiveStatementImpl)) {
             return false;
         }
         final AugmentEffectiveStatementImpl other = (AugmentEffectiveStatementImpl) obj;
-        if (!Objects.equals(targetPath, other.targetPath)) {
-            return false;
-        }
-        if (!Objects.equals(whenCondition, other.whenCondition)) {
-            return false;
-        }
-        if (!getChildNodes().equals(other.getChildNodes())) {
-            return false;
-        }
-        return true;
+        return Objects.equals(targetPath, other.targetPath) && Objects.equals(whenCondition, other.whenCondition)
+                && getChildNodes().equals(other.getChildNodes());
     }
 
     @Override