diff options
author | 2018-10-30 13:22:36 -0400 | |
---|---|---|
committer | 2018-11-02 14:12:49 -0400 | |
commit | 23b36e3c69f25d8322afb79d5e6bace519db7cd3 (patch) | |
tree | 5223fe7c12d0b81877759e0c19653c6249c8cf29 /src/main/java/org/onap/pomba/contextbuilder/sdnc/model/RequestInformation.java | |
parent | a088960969f4d54e39cd83c8e24565301b6c7d67 (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/RequestInformation.java')
-rw-r--r-- | src/main/java/org/onap/pomba/contextbuilder/sdnc/model/RequestInformation.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/RequestInformation.java b/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/RequestInformation.java index f556845..fe5c831 100644 --- a/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/RequestInformation.java +++ b/src/main/java/org/onap/pomba/contextbuilder/sdnc/model/RequestInformation.java @@ -33,6 +33,8 @@ public class RequestInformation { @Expose private String requestAction; + private final static String NULL_STR = "<null>"; + /** * No args constructor for use in serialization * @@ -83,15 +85,15 @@ public class RequestInformation { sb.append(RequestInformation.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); sb.append("requestId"); sb.append('='); - sb.append(((this.requestId == null)?"<null>":this.requestId)); + sb.append(((this.requestId == null)?NULL_STR:this.requestId)); sb.append(','); sb.append("source"); sb.append('='); - sb.append(((this.source == null)?"<null>":this.source)); + sb.append(((this.source == null)?NULL_STR:this.source)); sb.append(','); sb.append("requestAction"); sb.append('='); - sb.append(((this.requestAction == null)?"<null>":this.requestAction)); + sb.append(((this.requestAction == null)?NULL_STR:this.requestAction)); sb.append(','); if (sb.charAt((sb.length()- 1)) == ',') { sb.setCharAt((sb.length()- 1), ']'); @@ -115,7 +117,7 @@ public class RequestInformation { if (other == this) { return true; } - if ((other instanceof RequestInformation) == false) { + if (!(other instanceof RequestInformation)) { return false; } RequestInformation rhs = ((RequestInformation) other); |