aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/main/java
diff options
context:
space:
mode:
authorParshad Patel <pars.patel@samsung.com>2018-11-12 19:34:38 +0900
committerTal Gitelman <tal.gitelman@att.com>2018-11-19 16:13:40 +0000
commit15738432c81b94056c425ed8c7db4f398912bd4a (patch)
tree2666ec24046d889d8f18095004e9f40f8a349991 /catalog-dao/src/main/java
parentd9dc69b70251551160466fd76a51a8ff16b4bdd0 (diff)
Fix sonar blocker issue in catalog-dao
Override equals() method in GraphRelation.java Issue-ID: SDC-1895 Change-Id: Ib6538043f81173336c30d6a97545ef036431c79f Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'catalog-dao/src/main/java')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/graph/datatype/GraphRelation.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/graph/datatype/GraphRelation.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/graph/datatype/GraphRelation.java
index 0c6b66f6d9..3249f37b31 100644
--- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/graph/datatype/GraphRelation.java
+++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/graph/datatype/GraphRelation.java
@@ -22,6 +22,7 @@ package org.openecomp.sdc.be.dao.graph.datatype;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.lang3.builder.EqualsBuilder;
public class GraphRelation extends GraphElement {
@@ -105,4 +106,21 @@ public class GraphRelation extends GraphElement {
result = prime * result + ((type == null) ? 0 : type.hashCode());
return result;
}
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+
+ if (obj == null)
+ return false;
+
+ if (!(obj instanceof GraphRelation)) {
+ return false;
+ }
+
+ GraphRelation other = (GraphRelation) obj;
+
+ return new EqualsBuilder().append(from, other.from).append(properties, other.properties).append(to, other.to).append(type, other.type).isEquals();
+ }
}