summaryrefslogtreecommitdiffstats
path: root/common/src/main/java
diff options
context:
space:
mode:
authorMnushkin, Dmitry <dmitry.mnushkin@att.com>2019-09-20 11:32:36 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-09-24 17:12:44 -0400
commit894d2ecc888762c7a34c957ee5088c826a89f775 (patch)
tree22d56a8581d7e2276aa002161d8fe5bc6df8e74b /common/src/main/java
parent7e070b202cd8a109e7254854a23de33f91dc0522 (diff)
check for null before setting headers
check for null before setting headers Issue-ID: SO-2356 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I51bd332b13f687df09bc80489cf93baebc84ceb8
Diffstat (limited to 'common/src/main/java')
-rw-r--r--common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java b/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
index b0ffb9358c..e0c8d4ba80 100644
--- a/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
+++ b/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
@@ -52,6 +52,8 @@ public class DMaaPRestClient extends RestClient {
}
String onapRequestId = UUID.randomUUID().toString();
headerMap.put(ONAPLogConstants.Headers.REQUEST_ID, onapRequestId);
- headerMap.put(ONAPLogConstants.Headers.INVOCATION_ID, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID));
+ if (MDC.get(ONAPLogConstants.MDCs.REQUEST_ID) != null) {
+ headerMap.put(ONAPLogConstants.Headers.INVOCATION_ID, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID));
+ }
}
}