summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2022-07-27 20:14:54 +0000
committerGerrit Code Review <gerrit@onap.org>2022-07-27 20:14:54 +0000
commit692e99070d8ce2c6d432c5922cd0dccf57d8f904 (patch)
tree3febc965abb6ed21c563a2cd2b90dab1d6b58e67
parent3bb87eb14a329933bdc4f666ac696b6cb22736be (diff)
parent89bf2e721cd43c0acce52e0e6ea509d134be288e (diff)
Merge "CCSDK-3721: Fix sonar issues for AAIClientRESTExecutor"
-rwxr-xr-xadaptors/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/adaptors/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java b/adaptors/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java
index d3f79db8d..3ededcc54 100755
--- a/adaptors/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java
+++ b/adaptors/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java
@@ -52,6 +52,7 @@ import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.ObjectUtils;
import org.onap.ccsdk.sli.adaptors.aai.AAIService.TransactionIdTracker;
import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum;
import org.onap.ccsdk.sli.adaptors.aai.data.ErrorResponse;
@@ -160,8 +161,9 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface {
} catch (Exception ex) {
LOG.error("AAIResource", ex);
}
-
- ctx.init(kmf.getKeyManagers(), null, null);
+ if (ObjectUtils.anyNotNull(kmf)) {
+ ctx.init(kmf.getKeyManagers(), null, null);
+ }
CTX = ctx;
LOG.debug("SSLContext created");