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