summaryrefslogtreecommitdiffstats
path: root/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java
diff options
context:
space:
mode:
Diffstat (limited to 'ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java')
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java
index 532de1f9d..46aa2b55c 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java
@@ -40,11 +40,15 @@ public class ServiceListJson {
}
public boolean equals(Object obj){
- if(obj != null){
- ServiceListJson servobj=(ServiceListJson) obj;
- if(this.getName().equals(servobj.getName())){
- return true;
- }
+ if(obj == null){
+ return false;
+ }
+ if(this.getClass() != obj.getClass()){
+ return false;
+ }
+ ServiceListJson servobj=(ServiceListJson) obj;
+ if(this.getName().equals(servobj.getName())){
+ return true;
}
return false;
}