diff options
author | anushadasari <danush10@in.ibm.com> | 2019-11-20 16:37:35 +0530 |
---|---|---|
committer | anushadasari <danush10@in.ibm.com> | 2019-11-20 16:37:43 +0530 |
commit | bc025fbc60e7c0bef38dd0717e50a8b483393069 (patch) | |
tree | ce808c56ed65b6fc11aaf9c2d059c35b40b12aa0 /cmso-service/src | |
parent | b6128c2d522b60e432c0d957088428470721e534 (diff) |
Merge this if statement with the enclosing one
Merging collapsible if statements increases the code's readability.
Issue-ID: OPTFRA-634
Change-Id: I22d3bd915605507db8fbfcae9d52a5b1b2de8f3f
Signed-off-by: anushadasari <danush10@in.ibm.com>
Diffstat (limited to 'cmso-service/src')
-rw-r--r-- | cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java b/cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java index 893d74c..804fe68 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java @@ -72,10 +72,8 @@ public class CmsoClientFilters implements ClientRequestFilter, ClientResponseFil String transactionId = (String) headers.getFirst(MessageHeaders.HeadersEnum.TransactionID.toString()); String mdcId = MDC.get(MDC_KEY_REQUEST_ID); - if (transactionId == null || "".equals(transactionId)) { - if (mdcId != null) { + if ((transactionId == null || "".equals(transactionId)) && (mdcId != null)) { headers.add(HeadersEnum.TransactionID.toString(), mdcId); - } } headers.add(HeadersEnum.FromAppID.toString(), appId); } |