diff options
author | anushadasari <danush10@in.ibm.com> | 2019-11-12 12:34:52 +0530 |
---|---|---|
committer | anushadasari <danush10@in.ibm.com> | 2019-11-12 12:35:22 +0530 |
commit | 04f519ef388b9e41b36a583b6f9507e11ec82338 (patch) | |
tree | 3ec14e34fd73cc4cc46a2aff93ab3aa943a3abd9 /cmso-optimizer/src/main/java/org/onap | |
parent | 98e16e507d23f500b160ec86f2be4a8d68fa6d83 (diff) |
Merge this if statement with the enclosing one
Merging collapsible if statements increases the code's readability.
Issue-ID: OPTFRA-634
Change-Id: Ie2c335c7de466edb6064b85cb602db46b8f3225d
Signed-off-by: anushadasari <danush10@in.ibm.com>
Diffstat (limited to 'cmso-optimizer/src/main/java/org/onap')
-rw-r--r-- | cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java index 9aa439c..02d8886 100644 --- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java +++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java @@ -68,10 +68,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 || transactionId.equals("")) { - if (mdcId != null) { + if ((transactionId == null || transactionId.equals("")) && (mdcId != null)) { headers.add(HeadersEnum.TransactionID.toString(), mdcId); - } } headers.add(HeadersEnum.FromAppID.toString(), appId); } |