summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
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();