summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/VnfTopologyIdentifier.java
diff options
context:
space:
mode:
authorTait,Trevor(rt0435) <rtait@amdocs.com>2018-10-30 13:22:36 -0400
committerTait,Trevor(rt0435) <rtait@amdocs.com>2018-11-02 14:12:49 -0400
commit23b36e3c69f25d8322afb79d5e6bace519db7cd3 (patch)
tree5223fe7c12d0b81877759e0c19653c6249c8cf29 /src/main/java/org/onap/pomba/contextbuilder/sdnc/model/VnfTopologyIdentifier.java
parenta088960969f4d54e39cd83c8e24565301b6c7d67 (diff)
Address Bugs and Vulnerabilities in Sonar Report
Addressing Bugs and Vulnerabilities in Sonar Report. https://sonar.onap.org/dashboard?id=org.onap.logging-analytics.pomba%3Apomba-sdnc-context-builder Issue-ID: LOG-791 Change-Id: I11b984cac77c8a5674103672fa0e1332ed0aa4f7 Signed-off-by: Tait,Trevor(rt0435) <rtait@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/pomba/contextbuilder/sdnc/model/VnfTopologyIdentifier.java')
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/sdnc/model/VnfTopologyIdentifier.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/VnfTopologyIdentifier.java b/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/VnfTopologyIdentifier.java
index 507ae1d..8dbf0c8 100644
--- a/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/VnfTopologyIdentifier.java
+++ b/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/VnfTopologyIdentifier.java
@@ -39,6 +39,8 @@ public class VnfTopologyIdentifier {
@Expose
private String vnfType;
+ private final static String NULL_STR = "<null>";
+
/**
* No args constructor for use in serialization
*
@@ -109,23 +111,23 @@ public class VnfTopologyIdentifier {
sb.append(VnfTopologyIdentifier.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("genericVnfType");
sb.append('=');
- sb.append(((this.genericVnfType == null)?"<null>":this.genericVnfType));
+ sb.append(((this.genericVnfType == null)?NULL_STR:this.genericVnfType));
sb.append(',');
sb.append("serviceType");
sb.append('=');
- sb.append(((this.serviceType == null)?"<null>":this.serviceType));
+ sb.append(((this.serviceType == null)?NULL_STR:this.serviceType));
sb.append(',');
sb.append("vnfName");
sb.append('=');
- sb.append(((this.vnfName == null)?"<null>":this.vnfName));
+ sb.append(((this.vnfName == null)?NULL_STR:this.vnfName));
sb.append(',');
sb.append("genericVnfName");
sb.append('=');
- sb.append(((this.genericVnfName == null)?"<null>":this.genericVnfName));
+ sb.append(((this.genericVnfName == null)?NULL_STR:this.genericVnfName));
sb.append(',');
sb.append("vnfType");
sb.append('=');
- sb.append(((this.vnfType == null)?"<null>":this.vnfType));
+ sb.append(((this.vnfType == null)?NULL_STR:this.vnfType));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
@@ -151,7 +153,7 @@ public class VnfTopologyIdentifier {
if (other == this) {
return true;
}
- if ((other instanceof VnfTopologyIdentifier) == false) {
+ if (!(other instanceof VnfTopologyIdentifier)) {
return false;
}
VnfTopologyIdentifier rhs = ((VnfTopologyIdentifier) other);