Reduce cyclomatic complexity
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / UnknownEffectiveStatementImpl.java
index 2ee3f8283dc7c087ddd69b8f0fc3ffca30199039..6e197561dc67f9b5ae6b387c21c3d983af5b3fe7 100644 (file)
@@ -67,25 +67,12 @@ public final class UnknownEffectiveStatementImpl extends UnknownEffectiveStateme
         if (this == obj) {
             return true;
         }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
+        if (!(obj instanceof UnknownEffectiveStatementImpl)) {
             return false;
         }
         UnknownEffectiveStatementImpl other = (UnknownEffectiveStatementImpl) obj;
-        if (!Objects.equals(maybeQNameArgument, other.maybeQNameArgument)) {
-            return false;
-        }
-        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(maybeQNameArgument, other.maybeQNameArgument) && Objects.equals(path, other.path)
+                && Objects.equals(getNodeType(), other.getNodeType())
+                && Objects.equals(getNodeParameter(), other.getNodeParameter());
     }
 }