From b024f3e32c0eb4406313ce78abec747a58312838 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Wed, 25 Apr 2018 17:01:52 -0500 Subject: [PATCH] Fix bug introduced by Sonar work Issue-ID: AAF-256 Change-Id: I7885d8fed869893d653b05a09f1aa5f3016aebda Signed-off-by: Instrumental --- cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java b/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java index 2d252ea9..b34d096d 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/config/SecurityInfo.java @@ -224,8 +224,8 @@ public class SecurityInfo { } TrustManager tms[] = tmf.getTrustManagers(); - if(tms != null) { - tm = new X509TrustManager[(tms == null) ? 0 : tms.length]; + if(tms != null && tms.length>0) { + tm = new X509TrustManager[tms.length]; for(int i = 0; i < tms.length; ++i) { try { tm[i] = (X509TrustManager)tms[i]; -- 2.16.6