From 11d14b594d2f1867748fd1508c1336f288081fef Mon Sep 17 00:00:00 2001 From: burdziak Date: Tue, 22 May 2018 09:20:23 +0200 Subject: Fix sonar issues in JscepCA Change-Id: I445dd4b2296e64485c9866f403fb994c8b6af018 Issue-ID: AAF-307 Signed-off-by: burdziak --- .../main/java/org/onap/aaf/auth/cm/ca/JscepCA.java | 34 ++++++++-------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'auth/auth-certman/src/main/java') diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java index 0d494acd..ee73dbdc 100644 --- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java +++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java @@ -59,21 +59,21 @@ public class JscepCA extends CA { static final String CA_PREFIX = "http://"; static final String CA_POSTFIX="/certsrv/mscep_admin/mscep.dll"; - private final static String MS_PROFILE="1"; - private final static int MAX_RETRY=3; + private static final String MS_PROFILE="1"; + private static final int MAX_RETRY=3; public static final long INVALIDATE_TIME = 1000*60*10L; // 10 mins // package on purpose - private Map mxcwi_s; - private Map mxcwi_c; + private Map mxcwiS; + private Map mxcwiC; private JscepClientLocator clients; public JscepCA(final Access access, final String name, final String env, String [][] params) throws IOException, CertException, LocatorException { super(access, name, env); - mxcwi_s = new ConcurrentHashMap(); - mxcwi_c = new ConcurrentHashMap(); + mxcwiS = new ConcurrentHashMap<>(); + mxcwiC = new ConcurrentHashMap<>(); if(params.length<2) { throw new CertException("No Trust Chain parameters are included"); @@ -110,7 +110,7 @@ public class JscepCA extends CA { dir = dir + '/'; } String path; - List frs = new ArrayList(params.length-1); + List frs = new ArrayList<>(params.length-1); try { for(int j=1; j