X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=portal-BE%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportal%2Futils%2FEcompPortalUtils.java;h=caff67e30ea252299c7fd73d053469e9011ffc60;hb=ffd9af970318c1f5a0bad46d7aad5d4611414aae;hp=9e3a5d4b0adf8c1fccf6a06436e94c1b236b7e4e;hpb=fadf5206f07dada8b60b8ee5923cb33de90dbe5b;p=portal.git diff --git a/portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java b/portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java index 9e3a5d4b..caff67e3 100644 --- a/portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java +++ b/portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java @@ -71,7 +71,7 @@ import org.springframework.http.MediaType; public class EcompPortalUtils { - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EcompPortalUtils.class); + private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EcompPortalUtils.class); private static final String FUNCTION_PIPE = "|"; @@ -103,7 +103,7 @@ public class EcompPortalUtils { * @return List of tokens split from the source */ public static List parsingByRegularExpression(String source, String regex) { - List tokens = new ArrayList(); + List tokens = new ArrayList<>(); if (source != null && source.length() > 0) { String[] parsed = source.split(regex); for (String token : parsed) { @@ -225,7 +225,7 @@ public class EcompPortalUtils { String responseCode = MDC.get(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE); int responseCodeInt = 0; try { - if (responseCode != null && responseCode != "") { + if (responseCode != null && !responseCode.isEmpty()) { responseCodeInt = Integer.valueOf(responseCode); } } catch (Exception e) { @@ -530,7 +530,7 @@ public class EcompPortalUtils { logger.error(EELFLoggerDelegate.errorLogger, "Please check in system.properties whether the property exists or not!"); return false; - } else if (new Boolean(rmtCentralAccess)) { + } else if (Boolean.valueOf(rmtCentralAccess)) { logger.debug(EELFLoggerDelegate.debugLogger, "checkIfRemoteCentralAccessAllowed: {}", rmtCentralAccess); result = true; }