summaryrefslogtreecommitdiffstats
path: root/ECOMP-REST/src/main/java/org/openecomp
diff options
context:
space:
mode:
Diffstat (limited to 'ECOMP-REST/src/main/java/org/openecomp')
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java18
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/ServiceListJson.java18
2 files changed, 18 insertions, 18 deletions
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java
index ad6b503a2..115ed1410 100644
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java
+++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/adapter/AddressGroupJson.java
@@ -39,15 +39,15 @@ public class AddressGroupJson {
this.name = value;
}
- public boolean equals(Object obj)
- {
- AddressGroupJson servGroupobj=(AddressGroupJson) obj;
- if(this.getName().equals(servGroupobj.getName()))
- {
- return true;
- }
- return false;
- }
+ public boolean equals(Object obj){
+ if(obj != null){
+ AddressGroupJson servGroupobj=(AddressGroupJson) obj;
+ if(this.getName().equals(servGroupobj.getName())){
+ return true;
+ }
+ }
+ return false;
+ }
public int hashCode() {
return Integer.valueOf(name.charAt(0)+(name.charAt(1)));
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 81cfc03c6..532de1f9d 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
@@ -39,15 +39,15 @@ public class ServiceListJson {
this.name = value;
}
- public boolean equals(Object obj)
- {
- ServiceListJson servobj=(ServiceListJson) obj;
- if(this.getName().equals(servobj.getName()))
- {
- return true;
- }
- return false;
- }
+ public boolean equals(Object obj){
+ if(obj != null){
+ ServiceListJson servobj=(ServiceListJson) obj;
+ if(this.getName().equals(servobj.getName())){
+ return true;
+ }
+ }
+ return false;
+ }
public int hashCode() {
if(name!=null){