diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2019-08-05 11:58:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-08-05 11:58:27 +0000 |
commit | 6915f19540ea78f44254a37c6e318ea5d0b0e4f6 (patch) | |
tree | c31801d21e609a2be70622c7980d73d5b71cbd81 | |
parent | e44fee30ac2abded56a37bfe8e312d880ef8db53 (diff) | |
parent | e6a43de0f9a226b6bf79b376a32c1711276d3763 (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.java | 4 |
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(); |