aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-08-05 11:58:27 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-05 11:58:27 +0000
commit6915f19540ea78f44254a37c6e318ea5d0b0e4f6 (patch)
treec31801d21e609a2be70622c7980d73d5b71cbd81
parente44fee30ac2abded56a37bfe8e312d880ef8db53 (diff)
parente6a43de0f9a226b6bf79b376a32c1711276d3763 (diff)
Merge "Added newToken null check to prevent crash at newToken.getValue() call"
-rw-r--r--cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java b/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java
index 2478557afc..c4dcc89d0b 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClientTokenProvider.java
@@ -59,7 +59,9 @@ public class CloudifyClientTokenProvider implements CloudifyTokenProvider {
tokenRequest.setBasicAuthentication(user, password);
Token newToken = tokenRequest.execute();
- token = newToken.getValue();
+ if (newToken != null) {
+ token = newToken.getValue();
+ }
if (expiration == null) {
expiration = new Date();