summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChandan Ghosh <cghosh12@in.ibm.com>2019-02-06 14:55:31 +0530
committerChandan Ghosh <cghosh12@in.ibm.com>2019-02-06 14:56:55 +0530
commit90eee8f7432710c3e851d1bbb8678b4e6670c3b2 (patch)
treef9595969eaef2ddb42a3af4d4f61af8e41d30a32 /src/main
parentdfb5588c61ad49a5fdbc96d7a3dda5e5f887438c (diff)
Added fix for potential nullpointerexception
Added fix for potential nullpointerexception Issue-ID: DCAEGEN2-1076 Change-Id: I675d9dca7c46529203ef76233f60b15437796c9f Signed-off-by: Chandan Ghosh <cghosh12@in.ibm.com>
Diffstat (limited to 'src/main')
-rwxr-xr-xsrc/main/java/org/onap/dcae/collectors/restconf/common/RestConfProc.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/onap/dcae/collectors/restconf/common/RestConfProc.java b/src/main/java/org/onap/dcae/collectors/restconf/common/RestConfProc.java
index 5a4c880..cfebe3b 100755
--- a/src/main/java/org/onap/dcae/collectors/restconf/common/RestConfProc.java
+++ b/src/main/java/org/onap/dcae/collectors/restconf/common/RestConfProc.java
@@ -263,7 +263,9 @@ public class RestConfProc {
String headerName = "X-ACCESS-TOKEN";
if (token == null) {
headerName = HttpHeaders.AUTHORIZATION;
- token = getAuthorizationToken(p.restapiUser, p.restapiPassword);
+ if(null!=p) {
+ token = getAuthorizationToken(p.restapiUser, p.restapiPassword);
+ }
}
AdditionalHeaderWebTarget newTarget = new AdditionalHeaderWebTarget(target, token, headerName);
EventSource eventSource = EventSource.target(newTarget).build();